▸ Part 01 · Diagrams 01 / 03

Linked list visualizations

Two figures — how an insertion threads a new node between two existing nodes, and the reference list used by the practice questions.

/* Figure A */

Inserting a node between two existing nodes

Three stages — original list, the moment the new node's next pointer is set, and the final state after the previous node has been redirected.

1 · Initial list — two nodes head 10 20 NULL 2 · newNode->next = first->next; head 10 20 NULL 15 newNode 3 · first->next = newNode; head 10 15 20 NULL
/* Figure B */

Reference list — four nodes

A simple list with values 10, 20, 30, 40. Every practice question on the next page operates on this exact configuration.

head 10 20 30 40 NULL