Skip to content

Commit 39daf27

Browse files
committed
chore: update
1 parent 84882e2 commit 39daf27

File tree

3 files changed

+0
-72
lines changed

3 files changed

+0
-72
lines changed

solution/2000-2099/2099.Find Subsequence of Length K With the Largest Sum/README.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -109,28 +109,6 @@ class Solution {
109109
}
110110
```
111111

112-
#### C++
113-
114-
```cpp
115-
class Solution {
116-
public:
117-
vector<int> maxSubsequence(vector<int>& nums, int k) {
118-
int n = nums.size();
119-
vector<int> idx(n);
120-
for (int i = 0; i < n; ++i) {
121-
idx[i] = i;
122-
}
123-
sort(idx.begin(), idx.end(), [&](int i, int j) { return nums[i] < nums[j]; });
124-
sort(idx.begin() + (n - k), idx.end());
125-
vector<int> ans(k);
126-
for (int i = n - k; i < n; ++i) {
127-
ans[i - (n - k)] = nums[idx[i]];
128-
}
129-
return ans;
130-
}
131-
};
132-
```
133-
134112
#### Go
135113

136114
```go

solution/2000-2099/2099.Find Subsequence of Length K With the Largest Sum/README_EN.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -110,28 +110,6 @@ class Solution {
110110
}
111111
```
112112

113-
#### C++
114-
115-
```cpp
116-
class Solution {
117-
public:
118-
vector<int> maxSubsequence(vector<int>& nums, int k) {
119-
int n = nums.size();
120-
vector<int> idx(n);
121-
for (int i = 0; i < n; ++i) {
122-
idx[i] = i;
123-
}
124-
sort(idx.begin(), idx.end(), [&](int i, int j) { return nums[i] < nums[j]; });
125-
sort(idx.begin() + (n - k), idx.end());
126-
vector<int> ans(k);
127-
for (int i = n - k; i < n; ++i) {
128-
ans[i - (n - k)] = nums[idx[i]];
129-
}
130-
return ans;
131-
}
132-
};
133-
```
134-
135113
#### Go
136114

137115
```go

solution/3000-3099/3098.Find the Sum of Subsequence Powers/Solution.cpp

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)