Find kth largest number


here’s my code. i’m kinda new to heap. could you help me understand the time and space complexity of this program ?