Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
Input : "Red rum, sir, is murder" is a palindrome, while" Output: true Input : "Ahmed is Engineer" Output: false Input : "" Output: true Input : "a" Output: true
A usual palindrome problem is a little easier, since the assumption is all sort of charachters are included, for instance “abba” is a simple palindrome. we can use two indcies to traverse forward and backward and compare values for matching, an algorithm of time compliexity
But in this case we want to only consider alphanumeric characters and ignoring cases , we still run a forward and backward traverse , for each charachter we will check is letter is letter or digit using framework helper methdo
Char.IsLetterOrDigit() , if not then we move get next charachter until we get an alphanumeric char.