Easy · Two pointers
Valid Palindrome
You are given a string, s. Skip everything that is not a letter or a digit, and treat capital and small letters as the same. Return true if what is left reads the same forwards and backwards.
- Spaces and punctuation are skipped, not compared.
- A string with no letters or digits counts as a palindrome.
s = "A man, a plan, a canal: Panama"
→ true ("amanaplanacanalpanama")Record your take