Class Solution
-
- All Implemented Interfaces:
public final class Solution3138 - Minimum Length of Anagram Concatenation.
Medium
You are given a string
s, which is known to be a concatenation of anagrams of some stringt.Return the minimum possible length of the string
t.An anagram is formed by rearranging the letters of a string. For example, "aab", "aba", and, "baa" are anagrams of "aab".
Example 1:
Input: s = "abba"
Output: 2
Explanation:
One possible string
tcould be"ba".Example 2:
Input: s = "cdef"
Output: 4
Explanation:
One possible string
tcould be"cdef", notice thattcan be equal tos.Constraints:
<code>1 <= s.length <= 10<sup>5</sup></code>
sconsist only of lowercase English letters.
-
-
Constructor Summary
Constructors Constructor Description Solution()
-
Method Summary
Modifier and Type Method Description final IntegerminAnagramLength(String s)-
-
Method Detail
-
minAnagramLength
final Integer minAnagramLength(String s)
-
-
-
-