44. leetcode 28. Implement strStr()

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了44. leetcode 28. Implement strStr()相关的知识,希望对你有一定的参考价值。

28. Implement strStr()

Implement strStr().

Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.

思路:子串匹配,朴素匹配。

技术分享

 

以上是关于44. leetcode 28. Implement strStr()的主要内容,如果未能解决你的问题,请参考以下文章