Plays from YouTube after a click.

Sorting race

Why No Sorting Algorithm Can Beat n log n

Explained · 0:48 · 6 Nov 2026 · 38 views

Every comparison is a yes/no question. n items can be arranged n! ways, and each answer can rule out at most half of them — so any comparison sort needs about log₂(n!) ≈ n log n comparisons in the worst case. No clever trick gets around it.

Liked it? A like or a comment on YouTube helps the channel most.

Up next Which sorting algorithm wins on the same data?
The rule

Different algorithms sort the same shuffled data. Each one puts chaos in order its own way.

All about the sorting race →