CAIE 9618 · Paper 4 · Topic 4.3.2
Linked
Lists
Nodes · Data & Pointer Fields · Head Pointer · Insert · Delete · Traverse · vs Array
CSZone
Cambridge International AS & A Level Computer Science 9618
Structure of a Linked List
Nodes Connected by Pointers
A linked list is a dynamic data structure where each element (node) contains a data field and a pointer to the next node. Nodes can be scattered in memory — no contiguous allocation required.
Head →
Each node: Data field | Pointer field (address of next node). Last node points to NIL.
CAIE PSEUDOCODE NODE TYPE
TYPE Node
DECLARE Data : STRING
DECLARE NextNode : ^Node
ENDTYPE
TYPE NodePtr = ^Node
DECLARE Head : NodePtr
Head ← NIL // empty list
KEY TERMS
Head — pointer to the first node; NIL if list is empty
NIL — null/null pointer; end-of-list marker
Pointer — stores the memory address of the next node