Handle Score
@Ibrahim Nash 6420
@blackshadows 6380
@mb1973 5704
@Quandray 5245
@akhayrutdinov 5111
@saiujwal13083 5046
@sanjay05 3762
@kirtidee18 3673
@marius_valentin_dragoi 3523
@mantu_singh 3514
@sushant_a 3459
Complete Leaderboard
Save Ironman
Easy Accuracy: 48.44% Submissions: 2159 Points: 2

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.

Example 1:

​Input : S = "I am :IronnorI Ma, i"
Output : YES
Ignore all the symbol and whitespaces S = "IamIronnorIMai".
Now, Check for pallandrome ignoring uppercase and lowercase
english letter.

​Example 2:

Input : S = Ab?/Ba 
Output :  YES 


Your Task:
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.


to report an issue on this page.


We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?


All Submissions

My Submissions:

Login to access your submissions.

Save Ironman

Output Window