mycode 77.39%
class Solution(object): def findKthLargest(self, nums, k): """ :type nums: List[int] :type k: int :rtype: int """ nums.sort() return nums[-k]
参考
class Solution(object): def findKthLargest(self, nums, k): nums.sort(reverse=True) return nums[k-1]