All challenges
Algorithm challenge · DSA
Kth Largest Element in an Array
Difficulty
medium
Time
~25m
Format
Single
Grading
Auto-graded
#python#javascript#typescript#go#java#cpp#rust#dsa#heap#sorting
Mission file // read carefullymedium
Return the k-th largest element in nums (the k-th in sorted-descending order, not the k-th distinct).
nums = [3,2,1,5,6,4], k = 2 => 5
Build with
findKthLargest(nums: int[], k: int) → intPythonJavaScriptTypeScriptGoJavaC++Rust
4 tests · 1 hidden
Auto-graded on submit
Start challenge
Sign in to save your progress.