Array
▶ next()
hasNext ✓
+ 2nd cursor
▶ next() B
hasNext ✓
List
▶ next()
hasNext ✓
▶ next() on both
↺ Reset
Array
songs[i] · i++
Linked list
node = node.next
HEAD ↓
●
Neon Sky
●
Midnight Run
●
Paper Moon
●
Golden Hour
●
Static Love
Same call, different walk
Press
▶ next()
on either side — or
▶ next() on both
.
▸
Identical client action on both sides — the array iterator
hops an index
, the list iterator
follows a pointer
.