Maximum Repeating Substring Leetcode