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.
4923Post New Wollega University Interview Questions
what's the difference between abs/inc encoders. apart from the position remembrance what are all the other differences. and what's mean by grey code.
How you can capture the script of the authentication window in jmeter?
Which is executed if an exception has not occurred?
How do you clear the command prompt screen?
Who was the first person to recognize that true flies have two wings and gave them the name ?Diptera??
In spring, what is weaving?
What are the types of gradients in css3?
How to access a models data from a view in backbone.js?
Why did you choose marketing as a profession?
How will you edit a baseline file of a verification point?
Can you print to the edge of paper?
What is JSON-RPC and JSON-RPC-Java?
Why did we open the android source code? What is the guardian app for android?
How do you unload the GUI map?
Difference between sy-tabix and sy-index? Where it is used? Can you check sy-subrc after perform?