Heapsort for Javascript Newbies

added by JavaScript Kicks
9/5/2019 12:00:00 AM

207 Views

So the steps to heapsort are as follows: build a max heap, so that the element with the greatest value is at the top. switch it with the last element and remove it from the heap. repeat steps one and two until the heap has only one element remaining.


0 comments