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.
4899Post New Wollega University Interview Questions
What are two formats of WWN defined by the IEEE?
What are the properties that have to be initialized for creating a silverlight control using createsilverlight()?
What is relationship database?
Letter from satisfied customers are enough to substantiate claims
Differentiate between django, pyramid, and flask?
What is this () in java?
i develop a web application and i gave security setting i.e autherization and athentication now it work properly on my local system , now question is ,is this security setting ie autherization and athentication which i gave in web.config will it be enough strong to secure my application on internet or i have to use some 3rd party tool or software to get security .if yes --how ? if no--what is the alternate?
What are the differences between table and db checkpoints?
Explain pushdown optimization and types in informatica
Mention some of the important characteristics of neo4j?
How to add a javaScript function in a datagrid?
What is a 'division'?
What is the role of co-operating system in abinitio?
Define shear rate?
What do you mean by lookup table?