Logo
IconChallenge
Icon
IconProblem
IconSolutions
IconSubmissions

Valid Palindrome

XPChallenge Points: 10
levelLevel: Easy

A palindrome is a word, phrase, or number that reads the same forward and backward after:


• Converting all letters to lowercase.
• Removing all characters that are not letters or numbers.


Example 1:

Input: s = "No lemon, no melon"

Output: true

Explanation:

"nolemonnomelon" reads the same forward and backward.

Example 2:

Input: s = "Hello, world!"

Output: false

Explanation:

"helloworld" is not the same backward.

Example 3:

Input: s = "12321"

Output: true

Explanation:

"12321" is already a palindrome.

to Continue
like
dislike

Accepted:

Submission:

IconReport an issue
Icon
IconCode
IconYou need toto run or submitYou need toto run or submit
IconTest Case
IconTest Result