class Solution { public: char *strStr(char *haystack, char *needle) { if (haystack == NULL || needle == NULL) return NULL; int wpos[256]; char cur = 0; int len = 0; for (int i=0; i < 256; i++) wpos[i] = -1; for (int i=0; (cur = needle[i]) != '