Imperative programming (resit)

ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2022/imperative-programming-resit

Worked solutions for the held Oxford Long Vacation examination of 6 September 2022. Source release: released examination PDF. The cover date controls the identity despite the archive's older directory name. All eight questions and all 44 marked leaves are addressed, including alternatives not required of one candidate. No question statements or source figures are reproduced.
Code uses Scala 2 syntax. Mathematical invariants distinguish exact arithmetic from floating-point execution, and fixed-width sizes and counts are checked where necessary. Mutable structures are assumed to be used sequentially, with their stated representation invariants; destructive iterator adapters own their input states exclusively. Each question has its own code context, so the sparse-vector Node and tree Node[T] are independent definitions. No source attachment is missing.

New to topics? Read the docs here!