bogosort is the fastest sorting algorithm

preview_player
Показать описание
bogosort is the fastest sorting algorithm

#coding #leetcode #programming #interview
Рекомендации по теме
Комментарии
Автор

My favourite sorting algorithm still has to be miracle sort, check if the data is sorted, if yes, great, if not wait for a bit and check again...repeat. Eventually due to bit flipping or divine intervention the data will eventually be sorted...

Visibile_
Автор

Don't pick random permutation add all perms and then check for sorted one

AamilAli
Автор

Just use quantum sorting and discard all universes where bogo sort doesn’t get it right first try!

levoir
Автор

My favourite is time based sorting with O(n) complexity, register handlers with the corresponding number delays in milliseconds, add the number to an array in the callback 😂

samuelrobert
Автор

Miracle Sort
It didn't manipulate the array but wait for some internal or external force to sort it.

West_Waktole
Автор

bogo sort because i have seen it before and you said if its not sorted it will random number

trying_to_be_a_good_youtuber
Автор

You are wrong. The average number of iterations until the list is sorted is $n!$. This terminates with probability 1 by Kolmogorov's strong law of numbers. What is true is that there is no finite a priori bound on the number of shufflings required to achieve a sort.

ncmathsadist
Автор

O(infinity) is not a thing. f(x) = O(g(x)) means f/g is asymptomatically bounded. O(infinity) is not a valid notation.

yawninglion
Автор

In average case it’s only O(n*n!) time

dmr
Автор

The fastest of them all with a bit of luck

Charles-vpux
Автор

If you want a true o infinity Just pick a random number 😂

neverhood
visit shbcf.ru