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.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 3. Розділ 2
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Чудово!
Completion показник покращився до 4.76
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.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 3. Розділ 2
single