Insertion sort on 24 random elements, 6 moments from one run
Insertion sort on 24 random elements, 6 moments from one run
Each panel is the array as it actually stood after a particular write, sampled evenly across the 159 writes the run performed. The comparison counter beside each panel is the counter at that instant, so the picture and the numbers come from the same execution. The run finished at 157 comparisons and 0 swaps.
Drawn at 700 × 312, wide on the page.
Everything above is what sort-trace returns with no arguments; the caption is the
generator's own, computed from the numbers in the drawing rather than written beside it.
2 essays call
sort-trace. The drawing above is what it returns with no arguments at all; every
call below passes it something, because a placement that passes nothing draws whichever
member of the family the generator happens to default to rather than the one its essay
argues about — which is what optcheck and figfill exist to catch.
Where it is called
Changing this generator changes every one of these figures.