From 781b38d3fa815826a74f83fed616b3df630a5cf2 Mon Sep 17 00:00:00 2001 From: hbingzhi Date: Sat, 3 Dec 2022 14:46:28 +0800 Subject: [PATCH] =?UTF-8?q?1047.Java=E7=AC=AC=E4=BA=8C=E7=A7=8D=E8=A7=A3?= =?UTF-8?q?=E6=B3=95=EF=BC=8C=E5=8F=AF=E4=BB=A5=E4=BC=98=E5=8C=96=E6=88=90?= =?UTF-8?q?=E9=80=9F=E5=BA=A6=E6=9B=B4=E5=BF=AB=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- problems/1047.删除字符串中的所有相邻重复项.md | 3 +++ 1 file changed, 3 insertions(+) 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 { +