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.
If you have suggestions, corrections, or comments, please get in touch with Paul Black.
Entry modified 3 November 2005.
HTML page formatted Fri Feb 23 10:06:08 2018.
Cite this as:
Paul E. Black, "lucky sort", in Dictionary of Algorithms and Data Structures [online], Vreda Pieterse and Paul E. Black, eds. 3 November 2005. (accessed TODAY) Available from: https://www.nist.gov/dads/HTML/luckySort.html