dp [ i ] [ j ] stores the count of subsequence with ' a ' + i and ' a ' + j character
int [ ] [ ] dp = new int [ 26 ] [ 26 ] ; for ( int i = 0 ; i < s . length ( ) ; ++ i ) { for ( int j = 0 ; j < 26 ; j ++ ) {