2ez4me
2ez4me
全部文章
分类
复习(2)
题解(86)
归档
标签
去牛客网
登录
/
注册
2ez4me的博客
全部文章
(共4篇)
题解 | #最小的K个数 大根堆#
import java.util.*; public class Solution { public ArrayList<Integer> GetLeastNumbers_Solution(int [] input, int k) { PriorityQueue...
Java
堆(优先队列)
2022-03-23
0
223
题解 | #寻找第K大 堆#
import java.util.*; public class Solution { public int findKth(int[] a, int n, int K) { // write code here // 大根堆 Priorit...
Java
堆(优先队列)
2022-02-17
0
258
题解 | #最小的K个数 堆#
import java.util.*; public class Solution { public ArrayList<Integer> GetLeastNumbers_Solution(int [] input, int k) { //优先队列就是小根堆 ...
Java
堆(优先队列)
2022-02-16
0
311
题解 | #丑数 小根堆的应用#
import java.util.*; public class Solution { public int GetUglyNumber_Solution(int index) { if(index <= 6){ return index; ...
Java
堆(优先队列)
2022-02-13
0
411