摘要: Question:Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Analysis:实现strStr... 阅读全文
posted @ 2015-11-06 16:49 江湖小妞 阅读(216) 评论(0) 推荐(0) 编辑
摘要: Question:Write a function to find the longest common prefix string amongst an array of strings.Analysis:写一个函数找到一个字符串数组的最长公共前缀。思路:依次两两比较,用短的前缀更新比较长的前缀,... 阅读全文
posted @ 2015-11-06 10:57 江湖小妞 阅读(140) 评论(0) 推荐(0) 编辑