Official algorithmic problem description and constraints.
You are given a string s, which is known to be a concatenation of anagrams of some string t.
Return the minimum possible length of the string t.
An anagram is a word or phrase formed by rearranging the letters of a word or phrase, typically using all the original letters exactly once.
Example 1:
Input: s = "abba"
Output: 2
Explanation:
One possible string t could be "ba".
Example 2:
Input: s = "cdef"
Output: 4
Explanation:
One possible string t could be "cdef", notice that t can be equal to s.
Constraints:
1 <= s.length <= 105s consist only of lowercase English letters.Detailed video explanations, mathematical intuition, and clean C++ implementation code.