Definition of priority queue was given. We have to implement the priority queue using array of pointers with the priorities given in the range 1..n. The array could be accessed using the variable top. The list corresponding to the array elements contains the items having the priority as the array index. Adding an item would require changing the value of top if it has higher priority than top. Extracting an item would require deleting the first element from the corresponding queue. The following class was given: class PriorityQueue { int *Data[100]; int top; public: void put(int item, int priority); // inserts the item with the given priority. int get(int priority); // extract the element with the given priority. int count(); // returns the total elements in the priority queue. int isEmpty(); // check whether the priority queue is empty or not. }; We had to implement all these class functions.
4392Post New Wollega University C++ Code Interview Questions
What are applications areas of data mining?
I have 3 transactions,where the output of one transaction is input of another and output of 2nd transaction is input of 3rd transaction.i have one flat file with all data for the 3 transaction.if the 3rd transaction failed can we rollback the remaining 2 transactions or not.Is this possible in BDC,How/
whatis range of marcury filled tempereture gague
Can you provide an example of a situation where you used data-driven insights to optimize production processes?
What are the different components required in cloud architecture?
What are the various components of a spring application?
Why does this query return 0?
What is header in powerpoint?
How do I do a system restore if windows won't start?
What is trace flags — 5101 and 5102 in sybase?
How a timer enhances for controlling any process.
What is the ctrl alt delete menu called?
Can we declare main () method as non static?
What are the impacts that can be observed in implementing the internet of things on the agriculture sector?
Differentiate between Silverlight 1.0 and Silverlight 2?