In C++ Sort function, the third optional parameter is a comparator used to sort the objects. If we pass in less as the comparator, we will get objects in increasing order. (if the comparator is evaluated to be true, the positions won't be changed, otherwise elements will be swaped!) Is my understanding correct?
Following the same fashion, if we pass a less comparator to priority queue, we should get a min-heap,(if the underlying data structure is chosen to be vector, objects are sorted in increasing order. If we call top(), the first element of vector will be returned, which is the smallest number. Therefore, I think it is a min heap) why do we get a max heap?