摘要:
class Solution { public int[] topKFrequent(int[] nums, int k) { Map<Integer,Integer> map = new HashMap<>(); int[] res = new int[k]; for(int num:nums){ 阅读全文
posted @ 2022-06-07 10:59
11111ghm
阅读(82)
评论(0)
推荐(0)
摘要:
Map.entrySet() 这个方法返回的是一个Set<Map.Entry<K,V>>,Map.Entry 是Map中的一个接口,他的用途是表示一个映射项(里面有Key和Value),而Set<Map.Entry<K,V>>表示一个映射项的Set。Map.Entry里有相应的getKey和getV 阅读全文
posted @ 2022-06-07 10:56
11111ghm
阅读(37)
评论(0)
推荐(0)

浙公网安备 33010602011771号