solution.py
⌘↵ runLoading...
Kth Largest Element in Array
mediumYou've got this! Start small, think out loud.
Given an integer array `nums` and an integer `k`, return the kth largest element. Note that it is the kth largest in sorted order, not the kth distinct element.
Time:O(n log k)
Space:O(k)
heaptop-kgoogle-favorite
OUTPUT
Run your code to see output