Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5e3d23f

Browse files
更正 1047.删除字符串中的所有相邻重复项.md python方法一代码的错误
1 parent 13293e8 commit 5e3d23f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎problems/1047.删除字符串中的所有相邻重复项.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,9 @@ class Solution:
203203
res = list()
204204
for item in s:
205205
if res and res[-1] == item:
206-
t.pop()
206+
res.pop()
207207
else:
208-
t.append(item)
208+
res.append(item)
209209
return "".join(res) # 字符串拼接
210210
```
211211

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /