Kth Largest Element in an Array

Asked at Apple · Coding Questions · Difficulty: Medium · Last asked Feb 28, 2026

Given an array of integers and a rank `k`, find the element that would be in position `k` if the array were sorted from largest to smallest.

Loading the problem…