Skip to content

Commit 190b082

Browse files
committed
fix: go code
1 parent 1ccacfa commit 190b082

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

solution/2900-2999/2900.Longest Unequal Adjacent Groups Subsequence I/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,12 @@ public:
130130
131131
```go
132132
func getLongestSubsequence(words []string, groups []int) (ans []string) {
133-
for i, x := range groups {
134-
if i == 0 || x != groups[i - 1] {
135-
ans = append(ans, words[i])
136-
}
137-
}
138-
return
133+
for i, x := range groups {
134+
if i == 0 || x != groups[i-1] {
135+
ans = append(ans, words[i])
136+
}
137+
}
138+
return
139139
}
140140
```
141141

solution/2900-2999/2900.Longest Unequal Adjacent Groups Subsequence I/README_EN.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,12 @@ public:
154154
155155
```go
156156
func getLongestSubsequence(words []string, groups []int) (ans []string) {
157-
for i, x := range groups {
158-
if i == 0 || x != groups[i - 1] {
159-
ans = append(ans, words[i])
160-
}
161-
}
162-
return
157+
for i, x := range groups {
158+
if i == 0 || x != groups[i-1] {
159+
ans = append(ans, words[i])
160+
}
161+
}
162+
return
163163
}
164164
```
165165

Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
func getLongestSubsequence(words []string, groups []int) (ans []string) {
2-
for i, x := range groups {
3-
if i == 0 || x != groups[i - 1] {
4-
ans = append(ans, words[i])
5-
}
6-
}
7-
return
2+
for i, x := range groups {
3+
if i == 0 || x != groups[i-1] {
4+
ans = append(ans, words[i])
5+
}
6+
}
7+
return
88
}

0 commit comments

Comments
 (0)