Solution

ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2018/imperative-programming/4/d/ii/solution

The successive abstract sequences are , , , , , , , , and finally . The three removals return , , and , respectively. With the display convention in part (i), the output is
20
10
10
Queue status: [30, 40, 15]
The capacity-four bound is never exceeded. The abstract trace is independent of which physical array slots wrap around.

New to topics? Read the docs here!