Implement strStr().
Returns a pointer to the first occurrence of needle in haystack, or null if needle is not part of haystack.
I wrote that function before in practice without knowing anything about strStr(), so I have a pretty clear brute-force solution in my mind.
1 class Solution { 2 public: 3 char *strStr(char *haystack, char *needle) { 4 char *i = haystack; 5 char *j = needle; 6 int k = 0, m = 0; 7 if (*j=='