why do we have to pass vector while building a min heap
Min priority queue
hello @meadri17
this is the standard template for priority queue.
vector is the container used by priority to store its element.
if we only specify datatype and not anything else then it is treated as max heap.
otherwise we need need to mention two other arguments as well one is ur container and other is comparator.
comparator is function used by priority queue to decide the ordering of the elements it contains