I have to implement the minimum priority_queue
using vector<char, int>
.
I am confused with the following code snippet.
priority_queue(int , vector<char, int> , greater<int> pq;
But this is absolutely wrong.
I have to implement the minimum priority_queue
using vector<char, int>
.
I am confused with the following code snippet.
priority_queue(int , vector<char, int> , greater<int> pq;
But this is absolutely wrong.
This should work :
priority_queue<int,vector< pair<char, int> >, greater< pair<char,int> > > PQ;