Loading video...

Video Failed to Load

Go Home

which sorting algorithm keeps up with constant random updates best? at every second in this animation, a random item is taken (blue), and its value is changed

82,694 views • 2 years ago •via X (Twitter)

9 Comments

Urban Coyote's profile picture
Urban Coyote2 years ago

Stop it you’re hurting them 😭

Nick Sweeting's profile picture
Nick Sweeting2 years ago

How do I know if it's working without sound?

🍁 @notcatra.bsky.social 🍁's profile picture
🍁 @notcatra.bsky.social 🍁2 years ago

Rather than using a sorting algorithm, which will have to move on average N/2 elements to accommodate a changed value, isn’t it better just to use either a heap or a self-balancing binary tree? These are data structures specifically designed for this task

Jos van der Westhuizen's profile picture
Jos van der Westhuizen2 years ago

stumbled on this pretty cool gif of bubble sort

Gustavo W. Lopes's profile picture
Gustavo W. Lopes2 years ago

Well, that's one way to make merge and quicksort misearable.

King Arthur I's profile picture
King Arthur I2 years ago

this is inhumane

Ryan Moulton's profile picture
Ryan Moulton2 years ago

Bubble sort would come out much better if you did alternating sweeps in opposite directions.

D4's profile picture
D42 years ago

Knowing the obsession with randomness in the complexity community, I'm sure there are many un-readable papers on this.

MetaGlitch's profile picture
MetaGlitch2 years ago

Special requirements may warrant special algorithms. How about an alternating bubble sort that switches between walking upwards and downwards the array?

Related Videos