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.
4398Post New Wollega University Interview Questions
What is the use of search engine visibility field in wordpress reading settings?
iam an electronics & comm engg student.i have applied for AAI can u please forward the old and related question papers to my id lali.ece63@gmail.com
What is tag?
At o.s level where to check for system logs of sap application?
Please send me the sample pattern for the Electronics and communication for the post in RRB s&T to my Email ID : sivamec6034@gmail.com
What are the major components of sap gts?
What is minimum permicible value of leackage current for LT Panle when applying voltage up to 3 KV for 5 Minuits?
Creating Class and methods – Java OOP Exercise
hi frnds...pls send me aptransco previous papers .....pls..pls,,,(madhar.rocking@gmail.com)and suggest me some websites
In Manual testing how to test proxy servers? can u please explain with example?
What are pre-processor & post-processor elements?
Hi, I am Gurunathan. I am in need of ONGC, IOCL, DRDO technical test ( chemical engineering)and general aptitude questions. If anyone has kindly post it to me soon.
Please explain what are backlinks?
What is console.log() and why it is used?
What does the statement of Inventory be used for?