Function to check if the String is palindrome or not
static boolean checkPalindrome ( String s ) { int low = 0 , high = ( int ) s . length ( ) - 1 ; while ( low < high ) { if ( s . charAt ( low ) != s . charAt ( high ) ) return false ; low ++ ; high -- ; } return true ; }