From cbe3bcf50a8633b2c07ff92b86b7bd9780d62848 Mon Sep 17 00:00:00 2001 From: Yuhao Ju Date: Tue, 22 Nov 2022 10:13:52 +0800 Subject: [PATCH] =?UTF-8?q?update=20027.=E7=A7=BB=E9=99=A4=E5=85=83?= =?UTF-8?q?=E7=B4=A0=20python=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- problems/0027.移除元素.md | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/problems/0027.移除元素.md b/problems/0027.移除元素.md index e1de7243..a563a13f 100644 --- a/problems/0027.移除元素.md +++ b/problems/0027.移除元素.md @@ -199,21 +199,15 @@ Python: ```python3 class Solution: def removeElement(self, nums: List[int], val: int) -> int: - if nums is None or len(nums)==0: - return 0 - l=0 - r=len(nums)-1 - while l