# Given a non-empty string check if it can be constructed by taking a substring of it # and appending multiple copies of the substring together. # You may assume the given string consists of lowercase ...
# will contain all the characters in T in complexity O(n). while expected_count[ord(s[start]) - ord('a')] == 0 or \ current_count[ord(s[start]) - ord('a')] > expected ...