Question: Please help with C++ program which implements a priority queue data structure. Would like to understand more about how to fill in the code. Thank
Please help with C++ program which implements a priority queue data structure. Would like to understand more about how to fill in the code. Thank you.
#include
template
public: // desc: Inializes a new, empty queue PQ();
// desc: Adds new data to the queue // param: data The data to add to the list // param: priority The priority assigned to this node // returns: void void enqueue(T &data, int priority);
// desc: Removes the front element form the queue // returns: void void dequeue(void);
// desc: Removes the value found at the front of the queue // returns: The data found at the front of the queue T get_front(void);
// desc: Checks if the queue is empty or not // returns: true is the queue is empty, false if not bool isEmpty(void);
// desc: Clears the queue // returns: void void clear(void);
// desc: Returns the number of elements in the queue // returns: The number of elements in the queue int get_count(void); };
template
template
}
template
template
template
template
template
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
