help me to fixed
Hostel visit second test case fail
take long long instead of int and dont use set, because set reduces multiples occurences to one , use priority queue
Now priority queue implementation throw TLE
why are you using a stack?
you dont need a stack , whenever the sizeof priority queue is greater than k , remove an element.
see this implementations
i think if
number of type 2 input is greater than k , without any input of type 1 then your implementation fail.
see your implementation
that condition will not come
its given in the question, there will be at least k queries of type 1 before firt query of type 2
thank you very much.
just give the comments a like !
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.