LeetCode 215: Kth Largest Element In An Array — Step-by-Step Visual Trace
Medium — Heap | Array | Divide and Conquer | Priority Queue
The Problem
Find the kth largest element in an unsorted array. Note that it is the kth largest element in sorted order, not the kth distinct element.
Approach
Use a min-heap of size k to mai...
blog.tracelit.dev1 min read