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.
4972Post New Wollega University Interview Questions
Explain the ipv4 address bit?
What does orm stand for?
Is postgresql a relational database?
any idea abt REVERSE METERING concept.........?
What is Operational testing?
What is ember.js?
How to create a new calendar in CMC? Can u please tell me the process to create the required calendar. Ex:- Year of that calendar to start with Jan-15 and ends with Jan -30 and the Next month to start with Feb-31 and ends with Feb-14.
Is jsp server side or client side?
How do you check if a string is lexicographically in java?
Is it possible to default certain values for particular fields?
What are the typical modules of erp?
What does a treemap do?
Can we return null in java?
How to create a simple node js application?
Please help to get IOCL/HPCL or other chemical engineering paper pls send kathir_skv@yahoo.com Regards, kathirvel