Simply sort the array and return k - 1 element. 2 lines AC.
def findKthLargest(self, nums, k): nums.sort(reverse=True) return nums[k - 1]
Here it's just a practice, whatever you do will be fine.
But if you encountered this in an interview, you know what the interviewer expect right?