Priors

Expectation · Sorting a list · difficulty 5 of 5

Comparisons in quicksort

Quicksort sorts 10 different numbers: pick a random pivot, compare everything else to it, split, and repeat on each side. How many comparisons does it make on average? Give a decimal.

Answer with an expected value. First lock in a gut guess with an 80% range, then solve it properly, then watch a simulation settle on the truth.

Play it

More expected value puzzles

All expected value puzzles · All puzzles · Market making game