This question is a nice starting problem. The answer is entirely intuitive, and fairly straightforward. Essentially, check to see which words are valid, by seeing if there's enough letters in the bag to make the word. Output the score of the word with the highest (valid) point value. Use two arrays of size 26 (A-Z). - One holds the point value of each letter. - The other keeps track of how many of each letter are left in the bag. For each word in the dictionary wordScore = 0 For each letter in the word If the letter is in the bag Remove the letter from the bag Add the letter's point value to the score Or else The word is invalid Stop checking Output the highest wordScore