- Click New Question to generate Queue A (with random numbers) and an empty Queue B.
- Your goal: Dequeue all elements from Queue A in ascending or descending order (as specified in the question), using only the allowed queue operations and Queue B as a helper.
-
Dequeue A: Remove the front element from Queue A.
Dequeue B: Remove the front element from Queue B. -
Enqueue to B: Move the front element from Queue A to the rear
of Queue B.
Enqueue to A: Move the front element from Queue B to the rear of Queue A. - Reset: Restart the current question.
- When you think you have dequeued the sequence correctly, click Submit to check your answer. The Observations box will show feedback and, if incorrect, the correct answer.