Heap Demonstration Program
-
The nodes in an array are made into a heap.
Then additional nodes are inserted into the heap.
Finally all the nodes are removed from the heap.
-
Each node contains a key value and a data value.
-
The key values stored in the nodes of the subtrees
of any node are less than or equal to the key value of that node.
-
The key values for the nodes to be created may be specified
in the input area as e h g s o r a ! d k w c t.
The nodes with the key values preceding "!" are created in the
array and then heapified.
The nodes with the key values following "!" are inserted into the heap
one at a time.
Source Code of the Heap Program
Source Code of the HeapG Program (Graphical Version)
Jacob's CS 261 Demos
Jacob's CS 261 Home