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 : https://pastebin.com/6pnC3bfF

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

It seems to be working for me though.

@devansh1497

Find it here : https://ideone.com/v6C65C

@devansh1497 @akash19jain

Did you get a chance to look into this?

//