212k views
0 votes
Consider a circular array implementation of a queue contained using an array of size 6. I repeat x times (where x is 1 + the third digit of your student id): enqueue an item, dequeue it. Then I enqueue one item, what index of the array contains the tail of the queue?

User Markmc
by
4.8k points

1 Answer

5 votes

Answer:

The third digit of the student ID = 5;

Step-by-step explanation:

The Array is initially empty at the starting point.

ex) if x = 2, it is enqueue dequeue enqueue dequeue

User Deafjeff
by
4.1k points