Scrabble challenge: Difference between revisions

Undo revision 20751 by 123.176.38.2 (talk)
(Undo revision 20751 by 123.176.38.2 (talk))
Line 89:
====Step 3: find valid words====
 
Write the code to find all words from the word list that are made of letters that are a subset of the rack letters. There are many ways to do this, but here's one way that is easy to reason about and is fast enough for our purposes: go through every word in the word lishelist, and for every letter in that word, see if that letter is contained in the rack. If it is, save the word in a <tt>valid_words</tt> list. Make sure you handle repeat letters: once a letter from the rack has been used, it can't be used again.
 
<b>Step 3 resources</b>:
Line 100:
</li>
</ul>
 
 
====Step 4: scoring====
Anonymous user