Find Kth Largest Element in Unsorted Array

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

Given an unsorted integer array `nums`, return the `k`th largest element in the array. Note that it is the `k`th largest element in sorted order, not the `k`th distinct element.

Loading the problem…