题目
Implement strStr().
Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
题意
实现字符串匹配,这里我用的时两重循环解决,当然有更好的算法,如KMP
Python实现
|
|
step by step
Implement strStr().
Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
实现字符串匹配,这里我用的时两重循环解决,当然有更好的算法,如KMP
|
|
微信打赏
支付宝打赏