Skip to content

Commit f8ef1ac

Browse files
committed
fix: update
1 parent 6543726 commit f8ef1ac

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

solution/2100-2199/2148.Count Elements With Strictly Smaller and Greater Elements/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,8 @@ class Solution {
9898
class Solution {
9999
public:
100100
int countElements(vector<int>& nums) {
101-
auto [mi, mx] = std::ranges::minmax_element(nums);
102-
return std::ranges::count_if(nums, [mi, mx](int x) {
103-
return *mi < x && x < *mx;
104-
});
101+
auto [mi, mx] = ranges::minmax_element(nums);
102+
return ranges::count_if(nums, [mi, mx](int x) { return *mi < x && x < *mx; });
105103
}
106104
};
107105
```

solution/2100-2199/2148.Count Elements With Strictly Smaller and Greater Elements/README_EN.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,8 @@ class Solution {
9696
class Solution {
9797
public:
9898
int countElements(vector<int>& nums) {
99-
auto [mi, mx] = std::ranges::minmax_element(nums);
100-
return std::ranges::count_if(nums, [mi, mx](int x) {
101-
return *mi < x && x < *mx;
102-
});
99+
auto [mi, mx] = ranges::minmax_element(nums);
100+
return ranges::count_if(nums, [mi, mx](int x) { return *mi < x && x < *mx; });
103101
}
104102
};
105103
```
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
class Solution {
22
public:
33
int countElements(vector<int>& nums) {
4-
auto [mi, mx] = std::ranges::minmax_element(nums);
5-
return std::ranges::count_if(nums, [mi, mx](int x) {
6-
return *mi < x && x < *mx;
7-
});
4+
auto [mi, mx] = ranges::minmax_element(nums);
5+
return ranges::count_if(nums, [mi, mx](int x) { return *mi < x && x < *mx; });
86
}
97
};

0 commit comments

Comments
 (0)