From 0d3b8de51227c0c55ace89aa249e0a25377a62be Mon Sep 17 00:00:00 2001 From: borninfreedom Date: Sun, 13 Jun 2021 10:58:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BB=A3=E7=A0=81=E8=A7=84?= =?UTF-8?q?=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- problems/0242.有效的字母异位词.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/problems/0242.有效的字母异位词.md b/problems/0242.有效的字母异位词.md index c3e73730..1956253a 100644 --- a/problems/0242.有效的字母异位词.md +++ b/problems/0242.有效的字母异位词.md @@ -137,16 +137,16 @@ class Solution: def isAnagram(self, s: str, t: str) -> bool: from collections import defaultdict - s_dict=defaultdict(int) - t_dict=defaultdict(int) + s_dict = defaultdict(int) + t_dict = defaultdict(int) for x in s: - s_dict[x]+=1 + s_dict[x] += 1 for x in t: - t_dict[x]+=1 + t_dict[x] += 1 - return s_dict==t_dict + return s_dict == t_dict ``` Go: