AlgoScope

Traversal

Follow next pointers from head until null.

Linked list algorithms, algorithm, beginner
Visiting 2. Next is null. This is the last node.5142headcurr
Visiting 2. Next is null. This is the last node.5142headcurr

Singly Linked List: Traverse

Step, step 5 of 6

Visit 2. Its next is null: the end.

How singly linked list works

Cost

Best
O(n)
Average
O(n)
Worst
O(n)
Space
O(1)

Leads to

Topics that need this one first.

Taught by the same lesson

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