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 Interview Questions
what command would you use to move the physical log?
hii sir. how will CAE/CFD courses useful to B.tech freshers? is this courses useful to getting job in automobile industry? plz give rply..
What is bubble sort c++?
Mention how you can produce co-relations and covariances?
In which sql server version report builder introduced?
How to generate proxy for WCF Services?
Which java class handles the output record encoding into files which result from Hive queries?
What is the original Bot, and is it still available?
my brother is out of country i have lost his bank passbook when i was going to bank for the entries is their essential to take duplicate pass book can my brother is present for this.
In dual stack system, what are the ABAP and Java stack adapters?
How do I split an excel spreadsheet into multiple files?
What are Flume events?
What is numeric pyramid?
How do you teach difference between rows and columns?
What are the layers of FCOE Protocol?