JMCanning78 / DemoRepo

0 stars 0 forks source link

Add tree visualization to Heap #41

Open JMCanning78 opened 4 years ago

JMCanning78 commented 4 years ago

Add tree visualiztion to animated operations on the Heap in addition to the array visualization

Implement the tree part of the visualization of the methods for:

The tree should be drawn for the nItems currently in the heap. Animate the sift up and sift down operations performed by Insert and Remove Max. When Random fill creates an array filled with unsorted values, the tree will just show the first item at its root, a 1-item heap. During the animation of Heapify, the heapLo variable starts at the middle of the array and works toward the root. During that process the bottom nodes of the tree (top nodes of the heap) should be shown with empty frames for the nodes between the root and heapLo.

JMCanning78 commented 4 years ago

This issue depends on issues: #40, #39.