samedi 2 juin 2018

How can I build a heap for a set of elements by using priority_queue class in c++?

If we want to build a heap for a set of elements, make_heap takes O(n). How can I do the same using priority_queue class?

Thank you.

Aucun commentaire:

Enregistrer un commentaire