Stores the frequencies 's of  frequencies of array elements
Dictionary < int , int > mp2 = new Dictionary < int , int > ( ) ; foreach ( KeyValuePair < int , int > it in mp1 ) { if ( mp2 . ContainsKey ( it . Value ) ) { mp2 [ it . Value ] = mp2 [ it . Value ] + 1 ; } else { mp2 . Add ( it . Value , 1 ) ; } }