Back to QuestionsPractice with This Question
Kth Largest Element in an Array (Quickselect/Heap)
127.1K views•Asked at Google•
Medium
Question Explain
Given an unsorted array of numbers, find the $k$-th largest element. Solve using either Quickselect (average $O(n)$) or a Min-Heap (Max-Heap) ($O(n \log k)$).
Start Trying This Question Simulation
Practice answering orally or with text to get instant AI feedback.