Minimum Length Substrings Leetcode Rating System