Jarvis is weak in computing palindromes for Alphanumeric characters.
While Ironman is busy fighting Thanos, he needs to activate sonic punch but Jarvis is stuck in computing palindromes.
You are given a string S containing alphanumeric characters. Find out whether the string is a palindrome or not.
If you are unable to solve it then it may result in the death of Iron Man.
â€‹Input : S = "I am :IronnorI Ma, i" Output : YES Explanation: Ignore all the symbol and whitespaces S = "IamIronnorIMai". Now, Check for pallandrome ignoring uppercase and lowercase english letter.
Input : S = Ab?/Ba Output : YES
This is a function problem. The input is already taken care of by the driver code. You only need to complete the function saveIronman() that takes an string (ch), and return the true if the string is a palindrome and false if the string is not a palindrome. The driver code takes care of the printing.
Expected Time Complexity: O(N). where N is the length of the string
Expected Auxiliary Space: O(1).
1 ≤ |S| ≤ 100000
Note: Consider alphabets and numbers only for palindrome check. Ignore symbols and whitespaces.
We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?Yes