Created
June 5, 2018 08:38
-
-
Save shameemreza/06d7c75a0dfd787415efee1df5c5cc15 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<priority-queue> | |
using namespace std; | |
priority-queue<int> PQ; //decalre a max heap | |
PQ.push(4); //insert | |
PQ.top(); //maximum element | |
PQ.pop(); //pop max | |
PQ.size(); //returns size of heap | |
PQ.empty(); //returns 1 if heap is empty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment