Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

C++ STL Priority Queue

$
0
0

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.


Viewing all articles
Browse latest Browse all 39796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>