From 781076a73d7d9de9f0fe525cbc8404358ca59990 Mon Sep 17 00:00:00 2001 From: Tristone Date: Thu, 14 Jul 2022 22:39:17 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9C=80=E8=A6=81=E5=90=8C=E6=97=B6=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E8=BE=93=E5=85=A5=E6=95=B0=E7=BB=84nums?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- problems/0027.移除元素.md | 1 + 1 file changed, 1 insertion(+) diff --git a/problems/0027.移除元素.md b/problems/0027.移除元素.md index 9d687cfb..fd24e8f8 100644 --- a/problems/0027.移除元素.md +++ b/problems/0027.移除元素.md @@ -219,6 +219,7 @@ func removeElement(nums []int, val int) int { res++ } } + nums=nums[:res] return res } ```