Heap Sort
Performance Metrics
Array Size: 40
Number of Swaps: 0
Elements Checked: 0
How it works
Heap Sort is a smart way to sort a list by always finding the biggest item first. First, the list is turned into a special structure called a heap, where the biggest number is always at the top. Then, the biggest number is moved to the side, and the heap is fixed to find the next biggest. This happens again and again until everything is sorted. Heap Sort is fast, with a time complexity of O(n log n).