Too simple c++ solution


  • -17
    P
    int findKthLargest(vector<int>& nums, int k) {
            sort(nums.begin(), nums.end());
    	    return nums[nums.size() - k];
        }

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.