Search
⌘K

Leetcode 916. Word Subsets

Return all strings a in words1 that are "universal" — meaning for every b in words2, every character in b appears in a with at least the same multiplicity. This reduces to computing the maximum required count per letter across words2 and filtering words1 by comparing character frequency vectors.


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.