Here's the solution:
function findKthLargest(nums, k)
heap := empty min-heap
for each num in nums
if size of heap < k
insert num into heap
else if num > root of heap
extract min from heap
insert num into heap
return root of heap
Time: . Space: .
You'll find this better than sorting when is small relative to .