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.
4484Post New Wollega University Interview Questions
What is a Case Queue?
What is the use of let & const in javascript?
Tell us how can you find if an element is displayed on the screen?
What is microsoft c++ redistributable?
Mention what are three regions of operation of mosfet and how are they used?
Design a shear wall of length 4.20 m and thickness of 250mm subjected to the following forces.Assume Fck = 25Mpa and Fy = 415Mpa and the wall is a high wall with central part 3440mm x 250mm and two 380mm x 760mm strong bands at each end with following loading. S.No. Loading Axial force Moment Shear 1 DL+LL 1950 600 20 2 Seismic load 250 4800 700
Does a join table need a primary key?
Give example to differentiate between call by value and call by reference.
Which testing model is best as per your understanding, and why?
Write the use cases for following 1. Comment section of Facebook 2. Instagram status Implementation
How to select random rows from a table?
Mathematical models using linear, dynamic, integer, or algorithm models are considered: A. Project selection criteria B. A form of expert judgment C. Project selection methods D. A form of historical information
Explain the document currency (wrbtr) and local currency fields (debt) when posting a document in sap fi?
How you will handle the risk management when it comes to securing the transactions records?
What is the intermediate language between asp and asp.net1.0?