Challenge: Palindrome Detector
Aufgabe
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.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 3. Kapitel 2
single
Fragen Sie AI
Fragen Sie AI
Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen
Großartig!
Completion Rate verbessert auf 4.76
Challenge: Palindrome Detector
Swipe um das Menü anzuzeigen
Aufgabe
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.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 3. Kapitel 2
single