diff --git a/2099. Find Subsequence of Length K With the Largest Sum b/2099. Find Subsequence of Length K With the Largest Sum new file mode 100644 index 0000000..1ee40dd --- /dev/null +++ b/2099. Find Subsequence of Length K With the Largest Sum @@ -0,0 +1,19 @@ +class Solution { +public: + vector maxSubsequence(vector& nums, int k) { + vector>ans; + vectorarr; + for(int i=0; ip2.second; + }; + sort(ans.begin(), ans.end(), lambda); + sort(ans.begin(), ans.begin()+k); + for(int i=0; i