摘要: Implement strStr().Returns a pointer to the first occurrence of needle in haystack, ornullif needle is not part of haystack.此题应用KMP算法来解,但忘记了,写了个普通解line 10: 当needle == "" 时, 返回haystackline 11: 循环终止条件需注意 1 public class Solution { 2 public static String strStr(String haystack, String needle) 阅读全文
posted @ 2013-07-26 07:45 feiling 阅读(307) 评论(0) 推荐(0) 编辑