摘要: Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the difference between i and jis at most k. class So... 阅读全文
posted @ 2015-10-17 18:54 dylqt 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word in str. Exampl... 阅读全文
posted @ 2015-10-17 11:31 dylqt 阅读(149) 评论(0) 推荐(0) 编辑