I am porting a C++ library to Java and I need a heap data structure. Is there a standard implementation or will I need to do it myself?
In Java PriorityQueue can be used as a Heap.
Min Heap
PriorityQueue minHeap = new PriorityQueue<>();
Max Heap:
PriorityQueue maxHeap = new PriorityQueue<>(Comparator.reverseOrder());