Longest Repeating Substring Leetcode Solution 862