Repeated String Match Leetcode 150