|
Sorting algorithms/Heapsort - Rosetta Code
Heapsort is an in-place sorting algorithm with worst case and average complexity of O(n logn). The basic idea is to turn the array into a binary heap structure, which has the property that it allows efficient retrieval and removal of the maximal element.
rosettacode.org |
|