So basically I found this comparative function which was user defined on the video and I saw that while using (greater)… we can replace that function with a > b(which is a user-defined function as said on stack overflow if we don’t want to use pre-defined functions)… but if you replace it with a > b it gives a min heap and and if you give it a > b in the vector as comparator function then it will give you a descending order(max heap) so how exactly is the min heap thing working in the queue library and why do we need to pass a vector as a parameter while making min heap?
Does it do the heapify thing by first arranging all of them in descending order and then swapping with the elements in the end?