diff --git a/problems/1047.删除字符串中的所有相邻重复项.md b/problems/1047.删除字符串中的所有相邻重复项.md index 417c81d7..810f7292 100644 --- a/problems/1047.删除字符串中的所有相邻重复项.md +++ b/problems/1047.删除字符串中的所有相邻重复项.md @@ -153,6 +153,8 @@ class Solution { class Solution { public String removeDuplicates(String s) { // 将 res 当做栈 + // 也可以用 StringBuilder 来修改字符串,速度更快 + // StringBuilder res = new StringBuilder(); StringBuffer res = new StringBuffer(); // top为 res 的长度 int top = -1; @@ -470,3 +472,4 @@ impl Solution { +