String Matching Algorithm Leetcode 150