Heaps
This is another popular data structure implemented in C++ using a range.
We'll cover the following...
ℹ️ What is a heap?
A heap is a binary search tree in which parent elements are always bigger than their child elements. Heap trees are optimized for the efficient sorting of elements.
We can create a max heap with std::make_heap
. With std::push_heap
, we can push new elements on the heap. Conversely, we can ...