/*Implement strStr(). * *Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. */ class Solution { public: int strStr(string haystack, string needle) { int i=0,j=0; while(i=needle.size()) return i-j; else return -1; } };