|
hi...
i wanted to implement piority queues using c++ stl....
i want to extract both min and max elemnts (compute with the extracted value as well a s pop them out of queue)
for eg:
std:priority_queue<int> q;
q.push(7);
q.push(2);
i am able to pop the largest since front elemnet is largest...
well i want to pop the smallest elemnts as well..i also want the samallest and largest elemnt to be stored in a temp variable so as to compute sumthng else...
can u guide me on how do i do it here
|