Given a string s, partition it into the minimum number of substrings such that every distinct character in each substring appears with the exact same frequency.
Return the minimum number of substrings obtained in such a valid partition.
Constraints:
s.length
s consists only of lowercase English letters.
Given a string s, partition it into the minimum number of substrings such that every distinct character in each substring appears with the exact same frequency.
Return the minimum number of substrings obtained in such a valid partition.
Constraints:
s.length
s consists only of lowercase English letters.