3144. Minimum Substring Partition of Equal Character Frequency

Description

Given a string s, you need to partition it into one or more balanced substrings. For example, if s == "ababcc" then ("abab", "c", "c"), ("ab", "abc", "c"), and ("ababcc") are all valid partitions, but ("a", "bab" , "cc"), ("aba" , "bc", "c"), and ("ab", "abcc") are not. The unbalanced substrings are bolded.

Read more »
0%