摘要:
速度比较: 做完整的快排<<<不做完整的快排<<自建堆<不做完整的且随机选择哨兵的快排 贴上最快的代码: class Solution { int[] nums; public int findKthLargest(int[] nums, int k) { this.nums=nums; quick 阅读全文
posted @ 2021-07-24 15:54
wsshub
阅读(46)
评论(0)
推荐(0)
摘要:
hashmap+自建堆 class Solution { public int[] topKFrequent(int[] nums, int k) { HashMap<Integer,Integer> map=new HashMap<>(); for(int i=0;i<nums.length;i+ 阅读全文
posted @ 2021-07-24 15:37
wsshub
阅读(33)
评论(0)
推荐(0)

浙公网安备 33010602011771号