AlgoScope

Expected Time

AnalysisintermediateAsymptotic Notation

Average over the algorithm's own random choices, for any input.

Decision · step 2 of 56More Sorts: Same input, another seed, another path
range 0-1110213243546576879810911101211

Indices 0 to 11, depth 0. The seed picks index 11, holding 12, as the pivot.

Open in the player →or start at step 2

What you will see

Randomized quick sort on the same adversarial input, many seeds; the depth distribution.

How more sorts works →

Cost

SpaceO(1)

How you work with it here

explore, compare two runs, run it on your own input.

Screen readers: Growth curves are described in words and as a table of operation counts for sample input sizes; each concept has a one-sentence spoken definition.

Reduced motion: Curves and counters update without animation.

Leads to

Topics that need this one first.

Taught by the same lesson

More Sorts covers these too, in the same run.