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.
Soluzione
Grazie per i tuoi commenti!
single
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione
Can you explain this in simpler terms?
What are the next steps I should take?
Can you provide an example?
Fantastico!
Completion tasso migliorato a 4.76
Challenge: Palindrome Detector
Scorri per mostrare il 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.
Soluzione
Grazie per i tuoi commenti!
single