DSA · Reimagined
Linked Lists easy time O(1) at a known node space O(1)

Delete from a Linked List

To delete a node, make the previous node point to the one after it. The node is unlinked and disappears. Compare with an array, where every later element has to shift left.

7
0
3
1
9
2
4
3
head

Delete the node at position 2 — value 9.

1 / 5

Practice

Machine twin: /dsa-viz-v2/linked-list-delete.json — the full deterministic run as structured data.