Skip to content

Leonardo heap is the implicit data structure that uses only O(1) auxiliary data to implement smoothsort, an in-place algorithm offering average performance of O(n⋅log(n)) and O(n) in the best-case.

License

Notifications You must be signed in to change notification settings

iagustsson/leonardoheap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

leonardoheap

Leonardo heap was introduced by E. W. Dijkstra in 1981, as an implicit data structure for smoothsort that is a variant of heapsort. Smoothsort is an in-place algorithm which sorts n elements in an array by transforming the input into Leonardo heap using only O(1) auxiliary data. Smoothsort offers average performance of O(n⋅log(n)) and best-case performance of O(n).

Like heapsort, smoothsort has the general characteristic of O(n⋅log(n)) when sorting n elements, but for an input that is initially (nearly) sorted, smoothsort is of order O(n), "with a smooth transition between the two, hence its name"

Smoothsort, an alternative for sorting in situ [EWD82]

Smoothsort from Wikipedia

About

Leonardo heap is the implicit data structure that uses only O(1) auxiliary data to implement smoothsort, an in-place algorithm offering average performance of O(n⋅log(n)) and O(n) in the best-case.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages