Bogo Sort is a sorting algorithm that randomly shuffles a list of items until they happen to be shorted.
This algorithm is highly inefficient and should be avoided in practice, unless you are in the universe where it finishes in the first iteration.
Average complexity is O(n x n!).
What's your thoughts on this?
Subscribe for more algorithms animations!
コメント