Kth Largest Element in an Array (#215)
Given an integer array nums
and an integer k
, return the k
th largest element in the array.
Note that it is the k
th largest element in the sorted order, not the k
th distinct element.
Company Tags: Amazon, Microsoft
Core Concept: Sorting, Heap