From 7fac9733dac6d3e801ec1ee01bd485005b3c1a25 Mon Sep 17 00:00:00 2001 From: Tina-Brick <52629663+Tina-Brick@users.noreply.github.com> Date: Tue, 28 Dec 2021 02:40:35 -0600 Subject: [PATCH] =?UTF-8?q?Update=200242.=E6=9C=89=E6=95=88=E7=9A=84?= =?UTF-8?q?=E5=AD=97=E6=AF=8D=E5=BC=82=E4=BD=8D=E8=AF=8D.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- problems/0242.有效的字母异位词.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/problems/0242.有效的字母异位词.md b/problems/0242.有效的字母异位词.md index 4a8e9d14..cdcf39ce 100644 --- a/problems/0242.有效的字母异位词.md +++ b/problems/0242.有效的字母异位词.md @@ -125,6 +125,8 @@ class Solution: if record[i] != 0: #record数组如果有的元素不为零0,说明字符串s和t 一定是谁多了字符或者谁少了字符。 return False + #如果有一个元素不为零,则可以判断字符串s和t不是字母异位词 + break return True ```