- 1 current stop: learning
- 2 upcoming
- 3 upcoming
- 4 upcoming
- 5 upcoming
Finish after stop 5
Stop 1 of 5 · Flat road with a tailwind
Trick to keep in mind+3 XP
Count total pointer movement, not loop nesting.
A loop inside a loop is not automatically quadratic. Ask how far each pointer travels over the entire run. If the right edge visits each index once and the left edge only ever moves forward and never passes it, each pointer makes at most n moves in total. The inner loop just spreads those moves around.
Read it once, then a question tests whether the trick stuck.