Loop to find the frequencies of subsequence of length 1
for ( i = 0 ; i < n ; i ++ ) { string temp = " " ; temp += s [ i ] ; if ( freq . ContainsKey ( temp ) ) { freq [ temp ] ++ ; } else { freq [ temp ] = 1 ; } }