Given an ASCII string S1 and a substring S2 to search in. Find starting index in the target string S1 of first S2 occurence regardless of the character sequence. The complixity should be close to O(N * Log(M)).
Example: S1 = 'abc178965fdssa', S2 = '689' --> Index = 5
 
Test set 1
Result:
 
Test set 2
Result:
 
Test set 3
Result: