The test's questions that a run answers, asked again on new numbers whenever you like. The answer, its working and the reason for every other choice come from queue's own run on the numbers shown.
choose one
1question 1
An empty queue is given 6, 2, -, 9, 4, -. Each number joins, and each dash lets the front one leave. What does the line hold then, front first?
the answer, and why
the answer is A
6 leaves first, the oldest. Then 9 and 4 join behind 2, and the last dash lets 2 leave.
Queue, oldest out. Numbers join at the right end, the back, and leave from the left end, the front.
Out, in turn: 6, 2.
just put in
just taken out
Each operation in turn. The line ends holding 9 and 4.
if you chose another
BThat is a stack's answer, where each dash takes the newest. A leave always takes the front.
CThat misses the last leave, which lets 2 go.
DThat reads the line from the back. Front first, 9 leads.