Free practice · single-choice · medium
Practice
Spot an off-by-one boundary
Which range visits indexes 0, 1, 2, and 3 for a four-item list?
Repeated-state trace
A loop must make visible progress toward a defined stop
- InitializeSet deliberate starting state
- ReadTake the next item or state
- DecideEvaluate the loop condition
- UpdateChange counters and accumulators
- RecordWrite the reached state
- StopConfirm the stopping rule
Record the item, condition, counter, accumulator, and stopping decision on every pass to expose skipped, duplicated, or non-terminating work.