This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean palindrome(String string) | |
{ | |
return isPal(string, 0, string.length() - 1); | |
} | |
private boolean isPal(String string, int left, int right) | |
{ | |
if (left >= right) | |
{ | |
return true; |