Your free access ends in 7 days — and you haven’t tried it yet. Watch one algorithm run, start to finish. It takes about two minutes.

Try one problem
0
Concept

Overview

Nodes, next-pointers, and O(1) surgery
step 1 / 8
10
20
30
40
[0][1][2][3]
Concept
1node = { value, next } // next ARE the structure
2walk: cur = cur.next // access is O(n)
3splice: a.next = b // insert/delete is O(1)
4reverse: flip the arrows
5// tools: slow/fast pointers, dummy head
state
  • nodevalue + next

line 1A linked list is a chain of NODES. Each node holds a value and a pointer to the NEXT node. The arrows ARE the structure — the boxes just happen to be drawn side by side.