What are the values of queuefront and queuerear


Discuss the below:

Q1.Suppose that queue is a queueType object and the size of the array implementing queue is 100. Also suppose that the value of queueFront is 99 and the value of queueRear is 25.

a. What are the values of queueFront and queueRear after adding an element to queue?

b. What are the values of queueFront and queueRear after removing an element from queue?

Q2. Suppose that queue is implemented as an array with the special reserved slot. Also suppose that the value of queueFront is 74 and the value of queueRear is 99.

a. What are the values of queueFront and queueRear after adding an element to queue?

b. What are the value of queueFront and queueRear after removing an element from the queue? Also what was the position of the removal queue element?

 

Solution Preview :

Prepared by a verified Expert
Data Structure & Algorithms: What are the values of queuefront and queuerear
Reference No:- TGS01937766

Now Priced at $20 (50% Discount)

Recommended (94%)

Rated (4.6/5)