The queue we are considering will have the following three stages. Stage 1 : The queue will not start dequeuing items till it collect 2000 data points. Stage 2 : Once the 2000 data points are collected the queue will enqueue twice as fast as data is dequeued till the queue length becomes 20,000 data points. Stage 3 : The last stage will dequeue the data while no enqueuing occurs till the queue is empty. You may assume the data are integers. Carry out the following tasks in order to complete the worksheet. Helper programs are listed in Appendix A. Task 1 : Develop the queue using a dynamic array and test for the operations of the three states given above. Task 2 : Find the worst case running times for enqueue, dequeue, isEmpty, and isFull operation of the queue during the three stages. Task 3 : Develop the queue using a singly linked list and test for the operations of the three states given above.
Asked
Active
Viewed 78 times
0
-
2This isn't complex analysis. – Angina Seng Sep 14 '17 at 16:39
-
@TharinduRasanjana Have you tried to solve this? You should show your work. Where do you get stuck? – Epiousios Sep 14 '17 at 18:25