Most Unique Letters
Asked at Meta· Onsite
Reported by the problem's creator, not verified
You are given a list of lowercase words. Pick a subset of the words so that no letter appears more than once across all picked words, counting repeats inside a single word too. A subset's value is the number of distinct letters it covers. Picking nothing is allowed and covers 0 letters.
Examples
Example 1
Input: words =
["un","iq","ue"]Output:
4Explanation:
unandiqshare no letter and coveru,n,i,q— 4 letters.uesharesuwithun, so its best pairing is withiq, which also covers 4.
Import your own questions
Paste a question you were asked and get a full problem: statement, tests and a checked solution.