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.
5014Post New Wollega University Interview Questions
What is meant by mcmurray inverter?
What is route in mvc what is default route in mvc?
Can you get a virus from opening an email on your phone?
How do I set environment variables in windows?
rrb junior engg mecf questine papers
Define application context module?
How can i use virtual objects? If have i created one new virtual object in a virtual object manager by following instructions.
What version of php do I have windows?
Which function is executed before every action in the controller?
What are the rules of seven?
What is a sub query? Describe its types?
If you have given a project to take illegal step by a company, what will you do?
If a tablespace shows excessive fragmentation what are some methods to defragment the tablespace? (7.1,7.2 and 7.3 only)
What are the different types of validations in JSF?
What are wrapper classes in java?