The smoothsortsorting algorithm is a variation of heapsort developed by Edsger Dijkstra. The advantage of smoothsort is that it works in O(n) time if the input is (almost) sorted. Due to the extra complexity it is rarely used.
... advice for submission
to authority, warnings against temptation and how
to resist it, reflections about death and the judgment,
meditations upon the oblation of Christ, ...