×

Bogosort

Sorting algorithm
In computer science, bogosort is a sorting algorithm based on the generate and test paradigm. The function successively generates permutations of its input until it finds one that is sorted. Wikipedia
Worst-case complexity: Infinite
Stable: No
Best complexity: n
Average complexity: n*n!
Data structure: Array
Worst-case performance: Unbounded (randomized version), (deterministic version)