Inspiried by the Attachment B - elementary data structures from the textbook Graphentheoretische Konzepte und AlgorithmenISBN 978-3-8348-0629-1
Subject: Graph Theory from S. O. Krumpke and H. Noltemeier, which explains d-ary heaps, I developed a stepwise visualization of the basic dHeap operationsThe basic operations explained in the textbook are: insert a new node, reduce the value of a node, and remove the root node.
I extended the algorithms to increase the value of a node and to remove an arbitrary node. Both with an unchanged logarithmic running time. with the D3 Tree Layout.
The result of this work can be viewed online here. The loaded heap is the example from the book. First a 4 is inserted (right picture) and then the 2 gets removed.
|Technologies||D3, JS Prototypes, Closures|