28. Implement strStr()
2017-09-27 本文已影响0人
Jeanz
Implement strStr().
Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
方法1
直接用string自带的函数
return s.indexOf(t);
Implement strStr().
Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
方法1
直接用string自带的函数
return s.indexOf(t);