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 E. Black.
Entry modified 3 November 2005.
HTML page formatted Fri Mar 25 16:20:34 2011.
Cite this as:
Paul E. Black, "lucky sort", in Dictionary of Algorithms and Data Structures [online], Paul E. Black, ed., U.S. National Institute of Standards and Technology. 3 November 2005. (accessed TODAY) Available from: http://www.nist.gov/dads/HTML/luckySort.html