From 08781d4ceb4dbdaaa1a83517ccfc171b0b471524 Mon Sep 17 00:00:00 2001 From: X-shuffle <53906918+X-shuffle@users.noreply.github.com> Date: Wed, 12 May 2021 15:44:55 +0800 Subject: [PATCH] =?UTF-8?q?Update=200027.=E7=A7=BB=E9=99=A4=E5=85=83?= =?UTF-8?q?=E7=B4=A0.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加0027.移除元素 go版本 --- problems/0027.移除元素.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/problems/0027.移除元素.md b/problems/0027.移除元素.md index 5cfdb68d..144cd5be 100644 --- a/problems/0027.移除元素.md +++ b/problems/0027.移除元素.md @@ -129,7 +129,19 @@ Python: Go: - +```go +func removeElement(nums []int, val int) int { + length:=len(nums) + res:=0 + for i:=0;i