Gettting wrong ans in kth largest element in stream of integer.

I am getting wrong ans in problem Kth largest element in a stream on geeks for geeks.

my solution :

the link for pastebin is no longer working. It says that the page has been removed.

It seems to be working for me though.


Find it here :

@devansh1497 @akash19jain

Did you get a chance to look into this?