FOUNDATIONS · COMPLEXITY
Cost you can watch: every step drops a tile — see how the pile grows with n.
Speed isn't seconds — it's how steps grow with input.
n + 2 → O(n): keep what grows, drop the rest.
O(1) vs O(log n) vs O(n) vs O(n²) — a step-tile race.