Heap
| Invented by | Williams (1964) | |
|---|---|---|
| Idea: |
| |
| Advantages: | very easy implementation | |
| Disadvantages: | two heaps cannot be easily merged | |
| Implementation: | priority_queue in C++ STL, java.util.PriorityQueue in Java, or heapq module in Python |
[You can download the application for offline viewing.]
References
- J.W.J. Williams. Algorithm 232: heapsort. Communications of the ACM, 7(6):347-348, 1964. [bib]