Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bogosort and it's varients should be classed as "Permutation sorts" #89

Open
EilrahcF opened this issue Aug 5, 2020 · 1 comment
Open

Comments

@EilrahcF
Copy link

EilrahcF commented Aug 5, 2020

The Bogosort medita- I mean uh, ThatsOven from the discord server had a really good idea recently, including bogosort and the current disagreements behind it. His idea was close to the following: "The bogosorts are so different they should be given a new class like permutation sorts "
This seems like a really good idea from my eyes, since technically bozosort finishing with O(3) comparisons does seem a bit odd compared to the other algorithms. I understand if this is not worth the time and effort, but do you think you could concider it?
Image taken from the discord server:
ThatsOvens idea
(hopefully it works)

@MusicTheorist
Copy link
Owner

O(3) is actually the same as O(1)! That means "constant time", or "this algorithm will take the same amount of steps no matter how large the array". However, no sorting algorithm can do this, as you must do at least O(n) comparisons to determine if the array is already sorted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants