Check whether frequency of any two or more elements are same or not . If yes , return false
foreach ( KeyValuePair < int , int > i in freq ) { if ( uniqueFreq . Contains ( i . Value ) ) return false ; else uniqueFreq . Add ( i . Value ) ; }