A heap can be built from a table of random keys by using a linear time bottom-up algorithm (a.k.a., Build-Heap, Fixheap, and Bottom-Up Heap Construction). This algorithm ensures that the heap-order property (the key at each node is lower than or equal to the keys at its children) is not violated in any node.

In this exercise, the heap is visualized both as a binary tree and vector. Both visualizations illustrate the same data structure and the exercise can be completed by swapping keys in either visualization. The swapping is done by drag & dropping a key into another node.

Some additional problems.