Traverse through map only and using for - each loop for iteration over Map . entrySet ( )
foreach ( KeyValuePair < int , int > x in m ) { if ( x . Value == 1 ) { Console . Write ( x . Key + " ▁ " ) ; } } }