Longest Repeating Substring Leetcode Solution 19