Palindrome(not showing correct output)

Hi @Saksham12
You are printing false even for palindrome because you are taking i as l-1 and each time you are decrementing the value of i in while loop in if case so when it is a palindrome then i becomes -1 at the end. So you have to print true if i==-1;

Here is your corrected code :