Problem 3097. Scrabble Scores - 12
This problem builds directly off of Scrabble Scores - 10. Here, you are provided an existing word on the board from which you will play a word. The letter can reside anywhere (first to last) within the existing word and within the word that you are playing. Write a function to find the highest scoring word, provided any letter from the existing word that you are building off of and the letters on your tray.
Rather than having to test all the possible permutations against a dictionary, you will be provided a double-level cell array of strings containing all possible words based each starting letter in the existing word and the letters on your tray (a cell array for each letter in the existing word). (The word lists purposefully omit smaller words to prevent the test cases from being too large.) In addition to providing the highest score, also provide the word(s) that achieve that score in a cell array. See the test suite for examples. Due to high-scoring tiles, the highest score may not be achieved by the longest word(s).
Related problems:
Previous problem: 11 - Word score optimization (known letter & multipliers). Next problem: 13 - Word score optimization (first word & multipliers).
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers18
Suggested Problems
-
4549 Solvers
-
Project Euler: Problem 5, Smallest multiple
1339 Solvers
-
Return a list sorted by number of consecutive occurrences
360 Solvers
-
Generate N equally spaced intervals between -L and L
865 Solvers
-
559 Solvers
More from this Author139
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!