tap for sound

Top algorithm

Fast

Slow and simple

No comparing

Just for fun

Make video

Battle · 9 s

1080×1920 with sound, ready for TikTok, Reels and Shorts.

This one's a Pro video

It uses battle videos. Pro unlocks every look and sound, battle and multi-sort videos, and no watermark.

Secure checkout with Stripe · 14-day refund

Customize

Layout
ColoursRainbow
BackgroundMidnight
Glow100%
Size100%

Bucket Sort vs Quick Sort

Same 220 values, same shuffle, same speed. Bucket Sort finishes first and turns gold: 2,529 operations to 2,856.

The numbers

Bucket operations
2,529
Quick operations
2,856
Bucket average
n + k
Quick average
n log n
Bucket worst
n²
Quick worst
n²

Bucket Sort

Bucket Sort spreads values into buckets by range, sorts each bucket, then joins them. More on Bucket Sort.

Quick Sort

Quick Sort picks a pivot, splits the list into smaller and larger halves, and sorts each half the same way. More on Quick Sort.

FAQ

Which is faster, Bucket Sort or Quick Sort?

On this shuffle of 220 values, Bucket Sort needed 2,529 operations and Quick Sort needed 2,856, about 1.1× as many. On average Bucket Sort is n + k and Quick Sort is n log n.

Which one is stable?

Bucket Sort is stable; Quick Sort is not.

How is the race fair?

Both algorithms start from the same shuffle and run the same number of operations per frame. Every comparison, swap and write counts as one operation, so the one that needs fewer operations finishes first.