Challenge: Palindrome Detector
Tarefa
Swipe to start coding
Write a function that determines if a sentence is a palindrome, ignoring spaces, punctuation, and case.
- Remove all characters from the input string that are not letters or digits.
- Convert all remaining characters to lower case.
- Check if the resulting string reads the same forward and backward.
The function must return true if the cleaned string is a palindrome, and false otherwise.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 3. Capítulo 2
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Incrível!
Completion taxa melhorada para 4.76
Challenge: Palindrome Detector
Deslize para mostrar o menu
Tarefa
Swipe to start coding
Write a function that determines if a sentence is a palindrome, ignoring spaces, punctuation, and case.
- Remove all characters from the input string that are not letters or digits.
- Convert all remaining characters to lower case.
- Check if the resulting string reads the same forward and backward.
The function must return true if the cleaned string is a palindrome, and false otherwise.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 3. Capítulo 2
single