Search
⌘K

Leetcode 3138. Minimum Length of Anagram Concatenation

Given a string s known to be a concatenation of anagrams of some string t, find the smallest block length L (which must divide |s|) such that s can be partitioned into |s|/L contiguous blocks and every block has the same character multiset. This reduces to checking divisors of |s| and verifying equal frequency counts across fixed-size windows efficiently for n up to 1e5.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Your account is free and you can post anonymously if you choose.