Skip to content

Practice Minimum Length of Anagram Concatenation

Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.

Medium#3138
LeetCode Problem

Minimum Length of Anagram Concatenation

Problem Statement

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 formed by rearranging the letters of a string. For example, "aab", "aba", and, "baa" are anagrams of "aab".

Source: Minimum Length of Anagram Concatenation on LeetCode. Use the original task for its coding environment and submissions.

Examples

# Example 1

Input
s = "abba"
Output
2

# Example 2

Input
s = "cdef"
Output
4

# Example 3

Input
s = "abcbcacabbaccba"
Output
3

Constraints

1 <= s.length <= 10^5
s consist only of lowercase English letters.

Related LeetCode Problems

Practice more problems similar to Minimum Length of Anagram Concatenation.

Review your practice with PhantomCodeAI

After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.