lucky sort


Definition: The best possible sort algorithm: it is so lucky that the input is already sorted, and it need do nothing!

See also bogosort, bozo sort, stooge sort.

Note: Defined more for humorous, rather than serious, purposes. Time complexity is Θ(0) (zero): it takes no time.

Author: PEB

Go to the Dictionary of Algorithms and Data Structures home page.

If you have suggestions, corrections, or comments, please get in touch with Paul Black.

Entry modified 3 November 2005.
HTML page formatted Wed Mar 13 12:42:46 2019.

Cite this as:
Paul E. Black, "lucky sort", in Dictionary of Algorithms and Data Structures [online], Paul E. Black, ed. 3 November 2005. (accessed TODAY) Available from: