krystian1201 / MyScrabble

0 stars 2 forks source link

Dictionary - data structure - ideas #43

Open krystian1201 opened 9 years ago

krystian1201 commented 9 years ago

SharpScrabble: "For performance reasons, the SharpScrabble implementation alters the way the dictionary is stored in memory, choosing not to keep it as a simple list. The data structure used is a map from string to a list of strings. The key in this structure is an alphabetized string and the value is a list of valid words that can be formed by taking any permutation of these letters. Note that this does not include permutations of different sized combinations of these letters, but merely permutations of all given letters. For example, the value corresponding with key “aet” would be a list containing “eat”, “ate”, and “tea”, but not “at.”

krystian1201 commented 9 years ago

Maybe also sort the keys of the map according to their length