Write a function named isPalindrome
that determines whether a given string is a palindrome.
Learner Level
Loop
A palindrome is a word, phrase, or sequence that reads the same backward as forward, ignoring case and non-alphanumeric characters.
A string
is considered a palindrome if it reads the same forward and backward, ignoring spaces, punctuation, and capitalization. To check if a string is a palindrome, first sanitize it by removing unwanted characters and converting it to the same case. Then, compare the sanitized string with its reverse.