Question: A palindrome is a word that reads the same both forward and backward, like otto, kayak and racecar. An alternative, recursive definition of a

A palindrome is a word that reads the same both forward and backward, like "otto", "kayak" and "racecar." An alternative, recursive definition of a palindrome is "either an empty string or a word whose first letter is the same as the last, and whose middle is a palindrome." Given a string, write a recursive method that checks if a given string is palindrome, else not palindrome. Your input is a string and output will be a Boolean type. Add some code to main that tests your program. Example 1: Input malayalam Output: Yes Explanation: Reverse of malayalam is also malayalam. Example 2: Input: max Output: No Explanation: Reverse of max is not max.
Step by Step Solution
There are 3 Steps involved in it
Answer public class PalindromeCheck... View full answer
Get step-by-step solutions from verified subject matter experts
