A palindrome is a word, phrase, number or other sequence of units that can be read the same way in either direction.
To check whether a word is a palindrome I get th
IMO, the recursive way is the simplest and clearest.
public static boolean isPal(String s) { if(s.length() == 0 || s.length() == 1) return true; if(s.charAt(0) == s.charAt(s.length()-1)) return isPal(s.substring(1, s.length()-1)); return false; }