Skip to content
SimpleScope

Sorting algorithm race

Two algorithms, the same array, one clock. The clock does not count seconds: it counts operations, the comparisons and the writes each algorithm really performs. A swap is two writes. Whoever needs fewer operations finishes first, and that is what complexity means in practice.

Loading the algorithms...

Try your own input

Up to 16 whole numbers from -99 to 99, separated by commas or spaces.

A typical shuffled array.