正在加载视频...

视频加载失败

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,620 次观看 • 1 年前 •via X (Twitter)

9 条评论

Urban Coyote 的头像
Urban Coyote1 年前

Stop it you’re hurting them 😭

Nick Sweeting 的头像
Nick Sweeting1 年前

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

🍁 @notcatra.bsky.social 🍁 的头像
🍁 @notcatra.bsky.social 🍁1 年前

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 的头像
Jos van der Westhuizen1 年前

stumbled on this pretty cool gif of bubble sort

Gustavo W. Lopes 的头像
Gustavo W. Lopes1 年前

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

King Arthur I 的头像
King Arthur I1 年前

this is inhumane

Ryan Moulton 的头像
Ryan Moulton1 年前

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

D4 的头像
D41 年前

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

MetaGlitch 的头像
MetaGlitch1 年前

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

相关视频