The problem is:
Implement strStr().
Returns a pointer to the first occurrence of needle in haystack, or null if needle is not part of haystack.
A naive method: (1) find the the first letter of needle
in haystack
, (2)comparing other consecutive characters of needle and haystack, (3) if all letters in needle
can be found in haystack
consecutively, then return the position in haystack
.