Hello,
I wanted to implement a priority queue using C++ STL priority_queue.
I wanted to store a node in that priority queue. The structure of that node will be as
struct node{
int name;
int val;
}
The Priority queue should be sorted (or elements should be entered) according to the val variable inside that node.
Kindly help me out how to do this.
Thank You.