complete KMP and optimize strStr