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.
5016Post New Wollega University Interview Questions
List out the @functions?
What are overlays?
How to run DOCK 6 using cygwin?
What is Syntax for Specifying the Kind of Knowledge?
what are your career plans upon completion of the programme and the relevance of recity generation to your professional development?
What are the practices you follow for closing a project and meeting the conditions required to establish closure?
Write a program to paint the off-screen buffer in swings
What number ranges can be configured in srm ?
what are the differences among rownum, rank and dense_rank? : Sql dba
What is cross browser testing?
Does silverlight supports database connectivity? Explain
What are the beneficial tools for administering the database?
What is a year dependent and independent fiscal year variant?
Can we use an equated value as operands for an MVC ? Reason for the same.
what are the different methods to test a product in 'Japanese' language? NOTE:User is unable to perform basic functionalities while using the app..(copy, paste, text selection etc.)