ASAPUtils Logo ASAPUtils
Week 1

Valid Palindrome

Valid Palindrome with two pointers and O(1) space, with C++ and JavaScript solutions and the character filtering that makes it more fiddly than it first looks.

The problem

Given a string, return true if it reads the same forwards and backwards once you ignore case and skip every character that is not a letter or a digit.

"A man, a plan, a canal: Panama" -> true "race a car" -> false

Related Problems