Implement strStr()
Problem
Implement strStr().
Return the index of the first occurrence of needle in haystack, or -1
if needle
is not part of haystack
.
For example:
Solution
Last updated
Was this helpful?
Implement strStr().
Return the index of the first occurrence of needle in haystack, or -1
if needle
is not part of haystack
.
For example:
Last updated
Was this helpful?