AlgoScope

Array Traversal

AlgorithmbeginnerArray Techniques

Visit every slot once, in order. Nothing is skipped and nothing is revisited.

Result · step 6 of 7Array: Visit every slot
5✓01✓14✓22✓38✓4i

Index 4 holds 8. Running total 20.

Open in the player →or start at step 6

What you will see

One pointer walks the row; each visited cell is marked.

How array works →

Cost

BestO(n)
AverageO(n)
WorstO(n)
SpaceO(1)

How you work with it here

play it through, step one change at a time, scrub to any step, run it on your own input, predict what happens next.

Screen readers: Each cell is announced as index, value and state; each step's accessibility text states the decision and its effect.

Reduced motion: Swaps and shifts become value crossfades with an outline flash; pointers appear at their destination.

Before this

Taught by the same lesson

Array covers these too, in the same run.