If both pointers are at same position , it denotes that we don 't have sufficient characters  to make palindrome string
if ( left == right ) { return -1 ; } for ( int j = right ; j < n - left - 1 ; j ++ ) { swap ( s [ j ] , s [ j + 1 ] ) ; count ++ ; } } return count ; }