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 comments
Loading...
Problem Recent Solvers23
Suggested Problems
-
Remove any row in which a NaN appears
8771 Solvers
-
Calculate Euler's phi function
101 Solvers
-
Convert from Base 10 to base 5
281 Solvers
-
Sum the entries of each column of a matrix which satisfy a logical condition.
175 Solvers
-
Circular Primes (based on Project Euler, problem 35)
651 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!