Implement an ascending priority queue using a (linear) array. The items can be added to the queue
Fantastic news! We've Found the answer you've been seeking!
Question:
Implement an ascending priority queue using a (linear) array. The items can be added to the queue like a normal queue. However, the dequeue operation should remove the minimum item from the queue. Once an element is removed from the queue, shift the rest of the elements to the left. A sample run of the program should result in the contents as illustrated in the following Figure. (You do not need the maker ‘front’ for this implementation).
Related Book For
Computer Organization and Design The Hardware Software Interface
ISBN: 978-0124077263
5th edition
Authors: David A. Patterson, John L. Hennessy
Posted Date: