1、priorityQueue
大根堆
PriorityQueue<Integer> queue = new PriorityQueue<Integer>(new Comparator<Integer>(){ public int compare(Integer num1, Integer num2){ return num2-num1; } });
queue.peek() queue.poll() queue.offer()
2022-04-15 16:13:42
大根堆
PriorityQueue<Integer> queue = new PriorityQueue<Integer>(new Comparator<Integer>(){ public int compare(Integer num1, Integer num2){ return num2-num1; } });
queue.peek() queue.poll() queue.offer()
下一篇:TypeScript基础学习