Max Heap: Introduction
A brief introduction to max heap and how elements are inserted or removed from them.
We'll cover the following...
Building a max heap
As mentioned in the previous lesson, max heaps follow the max heap property, which means that the key at the parent node is always greater than the keys at the child nodes. Heaps can be implemented by using lists. Initially, elements are placed in nodes in the same order as they appear in the list. Then a function is called over the whole heap in a ...