BogoSort (the best sorting algo)

Revision en1, by StellarSpecter, 2024-08-24 09:51:12

We generate permutation of given array randomly until we get it sorted.

It's expected complexity should be factorial n for n sized array, but I saw on google it's factorial n+1.

Can anyone explain to me how is it factorial n+1, because for a binomial distribution E(x) = 1/p(x).

Please purify my understanding.

Also is there any sorting algorithm better than bogosort ?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English StellarSpecter 2024-08-24 09:51:12 415 Initial revision (published)