MCPcopy Create free account
hub / github.com/HuberTRoy/leetCode / findKthLargest

Method findKthLargest

Array/KthLargestElementInAnArray.py:125–132  ·  view source on GitHub ↗

:type nums: List[int] :type k: int :rtype: int

(self, nums, k)

Source from the content-addressed store, hash-verified

123
124
125 def findKthLargest(self, nums, k):
126 """
127 :type nums: List[int]
128 :type k: int
129 :rtype: int
130 """
131
132 return sorted(nums, reverse=True)[k-1]
133
134s = Solution()
135a = list(range(50000))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected