Heap sort is a sorting algorithm that can be thought of as an improved selection sort. Instead of searching through the whole unsorted list for the largest value, it instead builds a heap with the largest item at the top, swaps the top item into the correct place, then sifts the heap so that the largest item is at the top again. This is repeated until the whole list is sorted. Heap sort is a comparison sort, i.e. it sorts only by comparing and swapping list elements. https://en.wikipedia.org/wiki/Heapsort
Part of my series of sorting algorithms: https://scratch.mit.edu/studios/14132246/