Stores frequencies which are at least 2
Dictionary < int , int > freq_2 = new Dictionary < int , int > ( ) ; foreach ( KeyValuePair < int , int > entry in freq ) { if ( freq [ entry . Key ] >= 2 ) freq_2 [ entry . Key ] = freq [ entry . Key ] ; }