Which is the best Data Structure for Heap implementation and Why ?
I don’t about other languages, but in C++ you can use priority queue to create a minheap or a maxheap.
To create a max heap of integers, just type:
To create a min heap of integers, just type:
**priority_queue<int,vector<int>,greater<int> > minheap;**
In the second case, remember to