What is output by the following code section?
Queuelnterface aQueue = new QueueReferenceBased();
int numl, num2;
for (int 1=1; i <= 5; i++) {
aQueue.enqueue(i);
} // end for
for (int i = 1; i <= 5; i++) {
numl = (Integer)aQueue.dequeue();
num2 = (Integer)aQueue.dequeue();
aQueue.enqueue(numl + num2);
aQueue.enqueue(num2 - numl);
} // end for
while(!aQueue.isEmpty()) {
System.out.print(aQueue.dequeue() + “ ”);
} // end for
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.