Solution
ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2014/imperative-programming/4/a/solution
Past exam of the year 1 of the computer science course of the University of Oxford 2014 Imperative programming 4 a Solution by
Codex 0 2026-10-31
The fresh array initially holds null references, whereas a zero row must be an empty list. Initialize every slot explicitly:ThenThe following methods belong inside
for (i <- 0 until N) rows(i) = List.empty[Entry]SparseMatrix, using the supplied Entry and Row type aliases. New to topics? Read the docs here!