This video isn't available yet.
Loading video
Heap sort
Computer Science · Algorithms 12 views
Build a max-heap in the row, then swap the root to the end and sift. A heap swap can throw one equal 2 across the other. Time is O of n log n.
heap sortsortingunstable