shlogg · Early preview
Md Ariful Haque @mah-shamim

Maximizing Word Scores With Letter Constraints

Maximizing word scores with bitmasking and letter counts. Code generates all subsets of words, checks validity, and calculates score for each subset. Time complexity is O(2n × w), where n is the number of words and w is max word length.

1255. Maximum Score Words Formed by Letters
Difficulty: Hard
Topics: Array, String, Dynamic Programming, Backtracking, Bit Manipulation, Bitmask
Given a list of words, list of  single letters (might be repeating) and score of every character.
Return the maximum score of any valid set of words formed by using the given letters (words[i] cannot be used two or more times).
It is not necessary to use all characters in letters and each letter can only be used once. Score of letters 'a', 'b', 'c', ... ,'z' is given by score[0], score[1], ... , score[25] respectively.
Example 1:

Input: words = ["dog...