摘要: Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo... 阅读全文
posted @ 2015-11-06 22:51 eversliver 阅读(399) 评论(0) 推荐(0) 编辑
摘要: Given an array of strings, group anagrams together.For example, given:["eat", "tea", "tan", "ate", "nat", "bat"],Return:[ ["ate", "eat","tea"], ["na... 阅读全文
posted @ 2015-11-06 17:57 eversliver 阅读(229) 评论(0) 推荐(0) 编辑
摘要: Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.额,当然我用的就是暴力搜索来,没用到KMP之类的算法... 阅读全文
posted @ 2015-11-06 16:48 eversliver 阅读(325) 评论(0) 推荐(0) 编辑
摘要: The string"PAYPALISHIRING"is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font fo... 阅读全文
posted @ 2015-11-06 16:08 eversliver 阅读(453) 评论(0) 推荐(0) 编辑