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.
4920Post New Wollega University Interview Questions
Why are servlets used?
Explain transmission gate-based d-latch?
Which is a benefit of advertising online with google adwords?
What is the purpose of Chipping in the heavy foundation?
what are the db backup types?
Which is better trigger or stored procedure?
Does libreoffice have outlook?
What is the equivalent of switch expression in Kotlin? How does it differ from switch?
What are the common issues with outlook?
WHAT ARE THE SECTIONS OF SOX THAT ARE RELATED TO INTERNAL CONTROL?
What is strong-typing versus weak-typing? Which is preferred?
What is object spy in quicktest professional?
Explain the different types of validations in jsf?
Explain the working of timers in JavaScript? Also elucidate the drawbacks of using the timer, if any?
send me vizagsteel papers (m.t.. please.)