Answers for "what is the heap java"

6

heap in java

In Java PriorityQueue can be used as a Heap.

Min Heap
PriorityQueue<Integer> minHeap = new PriorityQueue<>();


Max Heap:
PriorityQueue<Integer> maxHeap = new PriorityQueue<>(Comparator.reverseOrder());
Posted by: Guest on August-31-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language