adding all words in map
for ( int i = 0 ; i < n ; i ++ ) { if ( mp . ContainsKey ( dictionary [ i ] ) ) { mp [ dictionary [ i ] ] = mp [ dictionary [ i ] ] + 1 ; } else { mp . Add ( dictionary [ i ] , 1 ) ; } }