For the questions that don’t fit in a textbook. Find their starting point
Fahahu

Ages 16–18 · A Level · Foundation

Count comparisons not just iterations

Use the evidence in count comparisons not just iterations to select and justify a valid solution.

Understand the idea

Complexity describes growth with input size rather than one timing result.

Your challenge

A loop visits all n elements once, but each visit compares against every previously seen element. Why is the total comparison cost not linear?

  • The inner work grows with the processed prefix, giving a quadratic total
  • Comparisons have no computational cost
  • One outer loop always means linear time

How to explore

  • Measure the work done per visit instead of only counting outer visits.
  • Compare each proposed response with the complete observation or trace, rather than with only one familiar word.
  • Check the selected response against the complete situation, including a case where a tempting alternative fails.

Open the activity to work with its controls and check your reasoning. Progress stays in this browser.

Keep exploring

DON’T LET THE QUESTION END HERE

Give that curiosity
somewhere to go.

Open the learning space

Discovery

Digital models simplify the real world. Explore with a grown-up and talk about what you notice.

Find something worth exploring

Explore free activities and printables, or learn about the separately paid Academy courses.