← problems
#125

Valid Palindrome

EasyTwo Pointers

A phrase is a palindrome if, after converting all uppercase letters to lowercase and removing all non-alphanumeric characters, it reads the same forward and backward.

Given a string s, return true if it is a palindrome, or false otherwise.

Example

"A man, a plan, a canal: Panama"  => true
"race a car"                      => false
Implement
function IsPalindrome(s: string) -> bool

Found a bug? Or annoyed about something in the language? Tell us.

loading editor…