Plays from YouTube after a click.
Sorting race
Up next Which sorting algorithm wins on the same data?
Why No Sorting Algorithm Can Beat n log n
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.
The rule
Different algorithms sort the same shuffled data. Each one puts chaos in order its own way.
All about the sorting race →