Utility method to check if substring from low to high is palindrome or not .
bool isPalindrome ( string :: iterator low , string :: iterator high ) { while ( low < high ) { if ( * low != * high ) return false ; low ++ ; high -- ; } return true ; }