Big-O: Race Perbandingan Playground

Five sorts and the engine’s own sort on the same sacks, n doubling up to 512: real comparison counts chalked on the board against n, n log n and n². Which…

Why it matters

"Which algorithm?" has no single answer: it depends on n, the data’s arrangement and memory. Watching real comparison counts climb as n doubles turns Big-O from a formula into a feel: why quick sort is fast but can be fragile, why merge is steady but needs a bench, why the built-in sort is quick on data that is already sorted.

The key idea

Big-O is growth: double n, watch the work

Common mistakes

Try it in this playground