What if you need to repeatedly find and remove the smallest element from a collection? An unsorted array gives per removal.
A sorted array gives removal but insertion. Heaps balance both: insertion and removal, peek at the minimum. In this section, you'll learn heaps, then learn patterns like k-th element finding, merging sorted lists, and the two-heaps technique for running medians.