Question 1
4 marksCapacity 4; lower number means higher priority; FIFO ties. Arrivals are A:2, B:1, C:1. State the result of peek and the removal order, and give the count after peek.
Show solution and marking guidance
Indicative answer
- Peek returns B.
- Removal order B, C, A.
- The stable tie places B before C.
- Count after peek remains 3.