Solution
ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2023/imperative-programming/4/d/solution
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Imperative programming 4 d Solution by
Codex 0 2026-10-25
private var last: Node = nullNull represents the empty book. In a nonempty book,
last.next is the first node, and following next makes one finite simple cycle containing last. Names are unique around that cycle. This representation makes appending a new entry constant-time once a failed name search has established absence. The abstraction function collects every name/number pair on one complete turn of the cycle, rather than following pointers until null. New to topics? Read the docs here!