Challenge: Palindrome Detector
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.
Solution
Merci pour vos commentaires !
single
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Can you explain this in simpler terms?
What are the next steps I should take?
Can you provide an example?
Génial!
Completion taux amélioré à 4.76
Challenge: Palindrome Detector
Glissez pour afficher le menu
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.
Solution
Merci pour vos commentaires !
single