Hi, I am working on a recursive palindrom program. All of my cases seem to work except for the case that a word has the same first and last letters but is NOT a plaindrome. It seems that at random, the program will some times provide the correct output. I think the problem is that the recursive call is not actually checking anything past the first and last character in the word, but I am not sure why?
Thanks!
The above piece of doesn't check if a substring word.substr(1,len-2) is a palindrome, it always returns true (after calling return you leave the function). Also, the condition always holds.