Mark those characters which are not present in both lowercase and uppercase
Dictionary < char , int > mp = new Dictionary < char , int > ( ) ; for ( i = 0 ; i < 26 ; i ++ ) { if ( small [ i ] != 0 && caps [ i ] == 0 ) { mp [ ( char ) ( i + 97 ) ] = 1 ; } else if ( caps [ i ] != 0 && small [ i ] == 0 ) mp [ ( char ) ( i + 65 ) ] = 1 ; }