[리트코드] 215. Kth Largest Element in an Array
215. Kth Largest Element in an Array
나의 풀이
/**
* @param {number[]} nums
* @param {number} k
* @return {number}
*/
var findKthLargest = function (nums, k) {
return nums.sort((x, y) => y - x)[k - 1];
};