Suppose we perform the following operations on a Queue:
(insert 1) (insert 2) (insert 3) (remove) (remove) (insert 4) (remove) (remove)
What is the order of the items that come out?
A: 1, 2, 3, 4
B: 4, 3, 2, 1
C: 2, 3, 1, 4
D: 3, 2, 4, 1
E: 2, 3, 4, 1
Answer: A
We said that queues are British, hyper-polite, boring: with a queue,
the answer is always 1, 2, 3, 4 ... regardless of what the question is.