Posted on

Description

Submission

class Solution {
public:
    int findKthLargest(vector<int>& nums, int k) {
        sort(nums.begin(), nums.end(), greater<int>());
        return nums[k-1];
    }
};

Leave a Reply

Your email address will not be published. Required fields are marked *