Function that returns true if sub - string starting at i and ending at j in str is a palindrome
function isPalindrome ( str , i , j ) { while ( i < j ) { if ( str [ i ] != str [ j ] ) return false ; i ++ ; j -- ; } return true ; }