ByteByteGo logo
menuProblems List

Kth Largest Integer

Medium

Return the kth largest integer in an array.

Example:

Input: nums = [5, 2, 4, 3, 1, 6], k = 3
Output: 4

Constraints:

  • The array contains no duplicates.
  • The array contains at least one element.
  • 1 ≤ k ≤ n, where n denotes the length of the array.

You can practice coding exercises online by logging into bytebytego.com on your laptop.