Loading problem…
Given an integer array nums and integer k, return the kth largest element in the array.
Note: this is the kth element in sorted order, not the kth distinct element.
Implement:
function findKthLargest(nums, k) {}findKthLargest([3, 2, 1, 5, 6, 4], 2);
// 5
findKthLargest([3, 2, 3, 1, 2, 4, 5, 5, 6], 4);
// 4