CODING
Day 7: The “Kth Largest Element in an Array” Problem
Published in
4 min readMay 10, 2020
Problem:
Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.
Example 1:
Input: [6,2,3,1,5,4] and k = 3
Output: 4
Example 2:
Input…