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.
4965Post New Wollega University Interview Questions
Explain the different types of view?
How does the internal authentication work in sas? : sas-grid-administration
What is Geolocation API in HTML?
How to retrive a student with height marks,second height and third height from MS access database what wil be the query for this purpuse?
Draw a pipeline configuration to carryout the following operations on the arrays of data represented by A, B, C, D, E and F. (A i represents the i th element of the array). (Ai × Bi + Ci × Di ) (Ei × Fi ) Show the content of the pipline for i = 1 to 5
Is there anything in particular that needs to be done to a user or a vendor to make them a valid part of SRM ?
What is the space complexity of selection sort?
name the algorithms used in Authentication
How do I add custom icons to windows 10?
How old is windows7?
What is sapscript? What is its purpose?
Is array a data structure?
What is service broker? : sql server database administration
What is orm in entity framework?
4.What is the business process of client? 5.Do you have any exp. Of debugging? 6.What is a business role? 7.Have you ever created different user interfaces for different users? 8. How will you analyse the best sales man or area through pipeline management. 9.How a lead goes to opportunity. 10.how a sales assistant works 11. What are the actions and conditions you defined for sales assistant? Explain.