首页
Java
登录
6mi
u
盘
搜
搜 索
Java
242. Valid Anagram
242. Valid Anagram
xiaoxiao
2021-02-28
83
class Solution(object): def isAnagram(self, s, t): """ :type s: str :type t: str :rtype: bool """ dic=collections.Counter(s) dic1=collections.Counter(t) if len(dic)!=len(dic1): return False for i in dic: if dic[i]!=dic1[i]: return False return True
转载请注明原文地址: https://www.6miu.com/read-61270.html
技术
最新回复
(
0
)