ret[i] should be the maximal j s.t. pattern[:j] is a suffix of pattern[:i+1], and j<i+1 ...
28. Implement strStr () (Easy) Implement strStr (). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Example 1: ...