Skip to content

Commit 3a7f332

Browse files
authored
Format SegmentTree constructor initialization list
1 parent ccdbf29 commit 3a7f332

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

solution/3400-3499/3485.Longest Common Prefix of K Strings After Removal/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,9 @@ public:
262262
int n;
263263
vector<int> tree;
264264
vector<int>& globalCount;
265-
SegmentTree(int n, vector<int>& globalCount) : n(n), globalCount(globalCount) {
265+
SegmentTree(int n, vector<int>& globalCount)
266+
: n(n)
267+
, globalCount(globalCount) {
266268
tree.assign(4 * (n + 1), -1);
267269
build(1, 1, n);
268270
}

solution/3400-3499/3485.Longest Common Prefix of K Strings After Removal/README_EN.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,9 @@ public:
256256
int n;
257257
vector<int> tree;
258258
vector<int>& globalCount;
259-
SegmentTree(int n, vector<int>& globalCount) : n(n), globalCount(globalCount) {
259+
SegmentTree(int n, vector<int>& globalCount)
260+
: n(n)
261+
, globalCount(globalCount) {
260262
tree.assign(4 * (n + 1), -1);
261263
build(1, 1, n);
262264
}
@@ -348,7 +350,6 @@ public:
348350
return ans;
349351
}
350352
};
351-
352353
```
353354
354355
#### Go

solution/3400-3499/3485.Longest Common Prefix of K Strings After Removal/Solution.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ class Solution {
1111
int n;
1212
vector<int> tree;
1313
vector<int>& globalCount;
14-
SegmentTree(int n, vector<int>& globalCount) : n(n), globalCount(globalCount) {
14+
SegmentTree(int n, vector<int>& globalCount)
15+
: n(n)
16+
, globalCount(globalCount) {
1517
tree.assign(4 * (n + 1), -1);
1618
build(1, 1, n);
1719
}

0 commit comments

Comments
 (0)