Deviopath › Go

Kth Largest

Hard · Algorithms

Return the k-th largest element of nums (k is 1-based: k=1 is the maximum). You may sort a copy. Do not modify the meaning of the input for later tests — they are separate runs.

Write KthLargest(nums, k).

Next: Merge JSON Objects