Given an integer array and an integer , return the k-th largest element. Note: it's the k-th largest in sorted order, not the k-th distinct element. Example: , Output: (sorted: , 2nd largest is ) You're solving the textbook heap problem for k-th element selection.
Data Structures19 sections · 729 units
Open in CourseProblem - Kth Largest Element
Classic heap problem