Naive Algorithm String Matching Leetcode Problem