摘要: 题目链接:https://leetcode.com/problems/word-pattern/ 思路分析:题目要求判断在pattern中的字符与str中的非空word之间是否存在双射,解法如代码所示。 循环不变量:当 I = k 时,并进行迭代时,pattern[0..i-1]与strings[0 阅读全文
posted @ 2016-03-24 00:12 Leptus 阅读(191) 评论(0) 推荐(0) 编辑