刚收到律师email,两个半月就批了。 自己citation 99,审稿也就15篇。有一篇nature,律师帮我大吹特吹。 这就批下来了,嘿嘿。 真诚推荐c m m律师
a*y
2 楼
哪个对老年人更不利?
g*9
3 楼
There is a Map and the integers may have duplicate values. Now I want you to output a list of strings. The strings are sorted by their corresponding integer values. The more compact the solution, the better.
their map.entrySet().stream().sort(e -> e.getValue()).map(e -> e.getKey()).collect (Collectors.toList());
【在 g*********9 的大作中提到】 : There is a Map and the integers may have duplicate values. : Now I want you to output a list of strings. The strings are sorted by their : corresponding integer values. The more compact the solution, the better.
不顾虑多用的内存的话 可以把这个Map扔到另一个TreeMap>里面 SortedMap> treeMap = new TreeMap<>(); for(String s: map.keySet()) if(treeMap.get(map.get(s)) == null){ List list = new LinkedList<>(); list.add(s); treeMap.put(map.get(s), list); }else{ treeMap.get(map.get(s)).add(s); } for(Integer i: treeMap.keySet()) for(String s: treeMap.get(i)) println(s);
their
【在 g*********9 的大作中提到】 : There is a Map and the integers may have duplicate values. : Now I want you to output a list of strings. The strings are sorted by their : corresponding integer values. The more compact the solution, the better.