priority_queue<pair<int,int>, vector<pair<int,int> >, greater< pair <int, int> > > here pair. First is used for comparing .... If you replace greater with lower , you get max heap.... If you use some structure... You have to define a bool function in tat case..
On 8/15/11, sandeep pandey <[email protected]> wrote: > would u pls elaborate this..? > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- Sent from my mobile device -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
