kindly comment out the errrors in this code, it doesnt pass any testcase.
Median in a stream of running integers
Also why do we require a vector in the min heap but not a max heap here?
@mkidwai74 max heap is by default which is formed so converting the max heap into minheap we have to reverse the comparator fucntion like this.
but for the comparator function we use greater,
i didnt understand why we also make priority queue of vectors
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.