Nodes and links
A linked list stores values in nodes. Each node points to the next one. The list starts at head. Unlike an array, you walk links instead of jumping by index.
Singly lists have only a next pointer. Doubly lists also keep prev, so you can walk both ways. Circular lists connect the last node back to the head — there is no None at the end.
head and follows next.class Node: def __init__(self, value): self.value = value self.next = None # doubly also: self.prev = None
Circular singly: the last node’s next points at head.
Run the simulation
Each tab walks search, insert, and remove on that list type.
Search, insert, and remove
Pick a list type, then use the syllabus operations on your own values.
Linked-list mental model
Pointers define the structure — change a few links and the list changes.
One-way next
Cheap forward walks. Going backward means starting over from head.
prev and next
Two-way travel. Remove can rewire both neighbours without a second scan.
Last links to head
No None tail. Stop a search when you return to head, or you’ll loop forever.