Search
⌘K

Leetcode 2514. Count Anagrams

Compute how many distinct strings you can get by independently permuting the letters of each word (words' order fixed); this equals the product over words of multinomial coefficients len! / ∏freq(letter)!, taken modulo 10^9+7. The challenge is efficient combinatorics under the 10^5 total length constraint (large factorials and modular arithmetic).


Question Timeline

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

Comments

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