Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- priority_queue< int > q;
- q.push( 10230 ); // inserting 10230
- q.push( 1021 ); // inserting 1021
- q.push( 102322 ); // inserting 102322
- while( !q.empty() ) {
- cout << q.top() << endl; // printing the top
- q.pop(); // removing that one
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement