16.01.2021 — Diary, Programming — 1 min read
Just solving today's Leetcode challenge and then relaxing
Copykth-largest-element-in-an-array.cpp: copy code to clipboard1int findKthLargest(vector<int> &nums, int k)2{3 sort(nums.begin(), nums.end(), greater<int>());4 return nums[k - 1];5}
1int findKthLargest(vector<int> &nums, int k)2{3 sort(nums.begin(), nums.end(), greater<int>());4 return nums[k - 1];5}
Ok, bye!