AlgoScope

Insert at Position

AlgorithmbeginnerLinked List Operations

Walk to the node before the gap, then relink it and the new node in order.

Result · step 3 of 5Singly Linked List: Insert at index 2
5✓1942headprev

Create 9 and point its next at 4 first, so nothing is lost.

Open in the player →or start at step 3

What you will see

Order matters: the new node grabs the successor first, then the predecessor lets go.

How singly linked list works →

Cost

BestO(1)
AverageO(n)
WorstO(n)
SpaceO(1)

How you work with it here

play it through, step one change at a time, scrub to any step, run it on your own input, predict what happens next, try operations in any order.

Screen readers: Each node announces its value and what it points to; each step announces the pointer change ("node 3 now points to node 5").

Reduced motion: Pointer arrows redraw in place with a brief emphasis instead of animating the detach and reattach.

Before this

Taught by the same lesson

Singly Linked List covers these too, in the same run.