check first half is ' a ' and other half is full of ' b '
int i ; for ( i = 0 ; i < n / 2 ; i ++ ) if ( str . charAt ( i ) != ' a ' || str . charAt ( n - i - 1 ) != ' b ' ) return " No " ; return " Yes " ; }