解开的都是套路: 算法小结--解题常用Utility code
Arrays.asList(arr);//arr is arrayQueue.addAll(Arrays.asList(arr))
1. Min Heap
PriorityQueue<Integer> minheap = new PriorityQueue<Integer>(); --default min heap
PriorityQueue<Integer> maxheap = new PriorityQueue<Integer>(10(initial capacity), Collections.reverseOrder());
Heap - poll(), peek(), offer()
Read full article from 解开的都是套路: 算法小结--解题常用Utility code
No comments:
Post a Comment