block by mpmckenna8 5b01b4f6e5cfb8ce022e287c80edaf8d

Heap-sort visualization

Full Screen

Visualization of heapsorting a js array

This tries to visualize the heapsort algorithm as I understand it. Basically you’d usually only want to run heapsort if you have a ballanced max or min heap. But this algorithm takes any given array, ballances it into a max heap then sorts stuff by popping off the largest item and putting it at the end of the array and repeating.

Check it out and let me know if I should add features and if there’s anything really wrong/bad about the code.

index.html

style.css