I wrote a little program that helps you cheat at Boggle. You enter the board and it gives you all the words in its dictionary file that are found on the board.
It's still not that fast, even though I don't generate all paths on the fly (I read the possible paths from a file). It seems like the slow part is looking up words in the dictionary. I should replace my (very slow) call to dictionary.contains with a binary search.
It's slow enough that it takes too long to get the longest words first! So I generate short words first and hope that by the time I've entered them, the cheater program has found the longer words.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment