AlgoScope

Amortized Analysis

AnalysisintermediateAmortized Analysis

Average cost per operation over a sequence, even when a few operations are expensive.

Decision · step 2 of 14Complexity in Numbers: Appends to a doubling array
123456789101112costsumavg1✓11.0

Append 1: room for it, one write. Cost 1, total 1, average 1.0.

Open in the player →or start at step 2

What you will see

Dynamic array appends: most cost 1, a few cost n; the running total stays under 3n.

How complexity in numbers 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.