3 ms·
This is known as BoZosort [1], which is said to be O(n!) on average. [1] https://en.wikipedia.org/wiki/Bogosort https://en.wikipedia.org/wiki/Bogosort
by astrobe_ 8y ago
This is known as BoZosort [1], which is said to be O(n!) on average.
[1] https://en.wikipedia.org/wiki/Bogosort https://en.wikipedia.org/wiki/Bogosort
- kevinwang 8y agoI think it may be another factor of n slower than that Edit: wow nevermind, I just read the paper linked to bozo sort in wikipedia. They conjecture that it's O(n!) whereas bogosort is Omega(n*n!). Wow, that's surprising!