One basic need is to filter my dictionary file to remove impossible words (or find impossible words), based on the number of tiles for each letter. Assume whatever dictionary structure you like, as well as the tile count list or structure of your choice. Assume blank tiles are a non-alpha character, such as '#'.
Challenge 1: Ignoring blank tiles, write a code snippet to efficiently match possible (or impossible) words in the dictionary.
Challenge 2: Modify #1 for blank tiles.
Bonus Challenge 3: Design a dictionary structure that enables efficient searches for puzzles, while minimizing space. For example, I have 5 tiles in @my_tiles, a given board partial row @this_row, which will have at least 1 tile placed, and possibly more, along with at least 1 blank space. The dictionary structure should make it easy to find all words that will fit in this partial row, using tiles from @my_tiles.
-QM
--
Quantum Mechanics: The dreams stuff is made of
In reply to Scrabble Word Regex Challenge by QM
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |