Heapsort
lastmod 2020-09-13created 2020-09-131 edits
Heapsort is a method of sorting by building a max-heap tree or min-heap tree: build a max heap to sort in descending order, and a min heap to sort in ascending order. The method of sorting by building a max heap is shown in the example below.