2 ms·
On further thought, you could use a bloom filter to test if a given set of letters has any valid words, then look up that set in a normal hash table (or use an
by buss 14y ago
On further thought, you could use a bloom filter to test if a given set of letters has any valid words, then look up that set in a normal hash table (or use an associate bloom filter).
I haven't done any calculations or experiments, but it doesn't seem like you'd save much computation time with the bloom filter vs just using a hash table that maps (letter sets) -> (words). I could see this being faster than a trie, though, since you aren't trying to do spelling suggestions and you lose a lot of time traversing the trie for all possible permutations of the letters.