Question: Using C++ 4. (10 points) Implement queue with linked list. Write the pseudo code for both push and pop functions. You can consider the head
Using C++

4. (10 points) Implement queue with linked list. Write the pseudo code for both push and pop functions. You can consider the head node as the front of the queue, and tail node as the rear of the queue. 5. (10 points) Suppose we use a circular array to implement a queue. The following figure shows the array (of which the capacity is 6), where the rear index "last" reaches the end of the array "data[5]" and the front index reaches the 4h element "datal3] first last data ] 2] 3] 4] 5 a) If we want to pop the front item off this queue, how the indices "first", "last", and the elements in "data array" will be changed b) After a), if we want to push a new item "7" into this queue, how the indices "first", "last", and the elements in "data array" will be changed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
