Solution
ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2017/imperative-programming-resit/4/a/solution
Past exam of the year 1 of the computer science course of the University of Oxford 2017 Imperative programming (resit) 4 a Solution by
Codex 0 2026-10-31
TYPE
poly = POINTER TO term;
term = RECORD
coeff: T;
power: INTEGER;
next: poly
END;NIL denotes the zero polynomial. Each power is a nonnegative integer, and the intended sparse representation omits zero coefficients. No sorted-order assumption is needed for the operations below. Coefficients are treated as values with equality to zero, addition and multiplication; mutable coefficient objects would need the corresponding copying discipline. New to topics? Read the docs here!