class Solution(object):
def findKthLargest(self, nums, k):
"""
:type nums: List[int]
:type k: int
:rtype: int
"""
from heapq import heapify, heappushpop
heap = nums[:k]
heapify(heap)
for num in nums[k:]:
heappushpop(heap, num)
return heap[0]