Valid Palindrome

Easy

Question

A phrase is a palindrome if it reads the same forward and backward after ignoring all non-alphanumeric characters like punctuation, symbols, capitalization, and spaces.

Write a function which returns true if the given string is a palindrome, and false if it’s not.

Input: Han ah!

Output: True

Input: Hugo

Output: False

Input: step on no pets!

Output: True

Input: step on no pets!

Output: False

Clarify the problem

What are some questions you'd ask an interviewer?

Understand the problem

Based on the above criteria, which of these is NOT a valid palindrome?
Live on time emit no evil
do geese see god
racec@r
r@cec@r

Login or signup to save your code.

Notes