摘要: 使用堆排序来解决《乱序数组第k大的数字》 先放上代码(虽然leetcode要求O(n),但是堆排序是O(nlogn)) `class Solution { public int findKthLargest(int[] nums, int k) { int heapSize = nums.lengt 阅读全文
posted @ 2023-08-01 14:58 神鹏佐佑 阅读(92) 评论(0) 推荐(0)