Driver code to test above methods
int main ( ) { string str = " abecbea " ; int idx = possiblePalinByRemovingOneChar ( str ) ; if ( idx == -1 ) cout << " Not ▁ Possible ▁ STRNEWLINE " ; else if ( idx == -2 ) cout << " Possible ▁ without ▁ removing ▁ any ▁ character " ; else cout << " Possible ▁ by ▁ removing ▁ character " << " ▁ at ▁ index ▁ " << idx << " STRNEWLINE " ; return 0 ; }