If last characters of two strings are same , ignore last characters and get count for remaining strings .
if ( str1 . charAt ( m - 1 ) == str2 . charAt ( n - 1 ) ) { return isKPalRec ( str1 , str2 , m - 1 , n - 1 ) ; }