```
class Solution:
# @param {integer[]} nums
# @param {integer} k
# @return {integer}
def findKthLargest(self, nums, k):
h = []
for n in nums:
if len(h) < k:
heapq.heappush(h, n)
else:
heapq.heappushpop(h, n)
return h[0]
```