Teach students how to trace out-of-bounds errors by demonstrating on the board.

  • Explicitly write, cross out, and update variable-value pairs when tracing through code that iterates.

More about this tip

External Source

Interview with Nick Melnyk