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: input = "H"an ah!"
Output: True
Input: input = "Hugo"
Output: False
Input: input = "step on no pets!"
Output: True
Input: input = "stop 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
Take a moment to understand the problem and think of your approach before you start coding.