In: Computer Science
Suppose you start with an empty queue and perform the following operations: enqueue 1, enqueue 2, dequeue, enqueue 3, enqueue 4, dequeue, enqueue 5. What are the resultant contents of the queue, from front to back?
Group of answer choices
1, 2, 3, 4, 5
1, 3, 5
1, 2, 3
3, 4, 5
Assume you are using the text's array-based queue and have just instantiated a queue of capacity 10. You enqueue 5 elements, dequeue 4 elements, and then enqueue 7 more elements. Which indices of the internal array elements hold the value null, that is, do not hold an element?
Group of answer choices
0 and 1
2 and 3
8 and 9
9 and 10
9 and 1
If N represents the number of elements in the queue, then the size method of the LinkedQueue class is O(N).
Group of answer choices
True
False
When an object of class LinkedQueue represents an empty queue, its rear variable is 0.
Group of answer choices
True
False