Doubt regarding the concept of stl minheap

why do we use greater as our comparator in minheap in stl?

hi @mvermav19
go through this–> https://stackoverflow.com/questions/32748069/the-reason-of-using-stdgreater-for-creating-min-heap-via-priority-queue

1 Like

okay!!
Now i understood the concept!
Thanks a lot!

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.