Skip to content
DSA Visualizerpreview

Delete from a linked list

Point the previous node past the one you remove.

O(n) time · O(1) space

List7, 4, 9, 1, 6value 9

Delete the first 9 from the list.

List: 7 → 4 → 9 → 1 → 6 → null.
  • compare
  • swap or write
  • settled

1 / 5

Speed

Space play · ← → step · Home End jump · drag the strip to scrub