地址:点击打开链接
和Word Pattern方法相似,答案都是一种
答案:
class Solution(object):
def isIsomorphic(self, s, t):
"""
:type s: str
:type t: str
:rtype: bool
"""
return map(s.find, s) == map(t.find, t)
地址:点击打开链接
和Word Pattern方法相似,答案都是一种
答案:
class Solution(object):
def isIsomorphic(self, s, t):
"""
:type s: str
:type t: str
:rtype: bool
"""
return map(s.find, s) == map(t.find, t)