摘要: 字符串(KMP算法) 28. 找出字符串中第一个匹配项的下标 参考:代码随想录 思考 一道简单的字符串单模匹配的题目。 使用暴力匹配,时间复杂度O(m*n)。 func strStr(haystack string, needle string) int { m, n := len(haystack 阅读全文
posted @ 2022-10-04 22:44 neil_liu 阅读(20) 评论(0) 推荐(0)