首页
Java
登录
6mi
u
盘
搜
搜 索
Java
290. Word Pattern
290. Word Pattern
xiaoxiao
2021-02-28
52
class Solution(object): def wordPattern(self, pattern, str): """ :type pattern: str :type str: str :rtype: bool """ s = pattern t = str.split()
return map(s.find, s) == map(t.index, t)
https://leetcode.com/submissions/detail/105273745/
转载请注明原文地址: https://www.6miu.com/read-62112.html
技术
最新回复
(
0
)