## heapsort

swMATH ID: | 34903 |

Software Authors: | Williams JWJ |

Description: | Algorithm 232 heapsort. wikipedia: In computer science, heapsort is a comparison-based sorting algorithm. Heapsort can be thought of as an improved selection sort: like selection sort, heapsort divides its input into a sorted and an unsorted region, and it iteratively shrinks the unsorted region by extracting the largest element from it and inserting it into the sorted region. Unlike selection sort, heapsort does not waste time with a linear-time scan of the unsorted region; rather, heap sort maintains the unsorted region in a heap data structure to more quickly find the largest element in each step.[1]. Although somewhat slower in practice on most machines than a well-implemented quicksort, it has the advantage of a more favorable worst-case O(n log n) runtime. Heapsort is an in-place algorithm, but it is not a stable sort. Heapsort was invented by J. W. J. Williams in 1964.[2] This was also the birth of the heap, presented already by Williams as a useful data structure in its own right.[3] In the same year, R. W. Floyd published an improved version that could sort an array in-place, continuing his earlier research into the treesort algorithm |

Homepage: | https://en.wikipedia.org/wiki/Heapsort |

Related Software: | Quicksort; MA57; HSL; HSL_MA87; GALAHAD; Algorithm 97; OR-Library; Find; AS 266; Julia; Algorithm 447; LAPACK; SteinLib; Qhull; gmp; k.c; MersenneTwister; Mathematica; DQP; HSL_MA77 |

Referenced in: | 61 Publications |

all
top 5

### Referenced by 97 Authors

all
top 5

### Referenced in 30 Serials

all
top 5