Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Min value map

Map -- Min value
Write a method that can return the minimum value from ta map
(DO NOT use sort method)
 
Solution: 
public  static  int  minValue( Map<String,Integer>    map  ) {
        SortedSet<Integer> sm = new TreeSet<>(map.values());
        return sm.first( );
}
 
PREVIOUS NEXT
Tagged: #Min #map
ADD COMMENT
Topic
Name
4+2 =