Find the Second Largest and Kth Largest Number

Asked at Spotify · Coding Questions · Difficulty: Medium · Last asked Jul 15, 2026

Given an integer array, find the second largest number and the kth largest number. Implement a function `find_kth_largest(nums, k)`. The function takes an integer array `nums` and an integer `k`.

Loading the problem…