Question: EXERCISE 3 - QUEUE a) Figures B6(a) and B6(b), show initial content of two more different implementations of a queue. Assumed maximum size of all


EXERCISE 3 - QUEUE a) Figures B6(a) and B6(b), show initial content of two more different implementations of a queue. Assumed maximum size of all arrays are 4. [0] [2] [3] 20 65 43 front rear (a) Queue 1 front 20 [3] (0) [1] [2] 43 65 rear (b) Queue 2 Figure B6: Two implementations of a queue (2) Perform the following operations to the two different queues in Figure B6. Then, redraw the queues after all the operations performed. Label the correct location of the front and rear (4 marks) enqueue (37); dequeue (); enqueue (56); enqueue (78); Based on the answer in (a) and (b) above, which queue implementation is the best? Justify your answer. (2 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
