Circular Linked List
The last node links back to the first; traversal wraps around.
Decision · step 6 of 9Singly Linked List: Close the list into a ring and walk it
Step 4 of 6: from 2 follow next to 5. That is the tail's arrow, so the walk wraps round to the head instead of stopping.
What you will see
The tail arrow curves back to the head; a traversal pointer loops.
Cost
| access | O(n) |
|---|---|
| insert at head | O(1) |
| insert at tail | O(1) with tail pointer |
| Space | O(n) |
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, try operations in any order.
Screen readers: Each element is an accessibility element with position, value and state; structural changes are announced per step.
Reduced motion: Elements appear at their destination with a crossfade; no travel longer than the element's own size.
Before this
Related
Taught by the same lesson
Singly Linked List covers these too, in the same run.