Insert the stream of keys into an originally empty binary heap. The heap is depicted in binary tree representation even though the implementation is an array starting from index 1 (the root node).
Each record stored into Heap is represented by a key that shows its priority. You can drag & drop the keys from the array into the heap and restore heap property after each insertion. If you drag & drop a key in heap on top of another one, the records are swapped, which corresponds to the operations in the "do" loop.