Exceptional Code: Solving the Boggle Game - Recursion, Prefix Tree, and Dynamic Programming
Solving the Boggle Game - Recursion, Prefix Tree, and Dynamic Programming I spent this past weekend designing the game of Boggle. Although it looks like a simple game at a high level, implementing it in a programming language was a great experience. I had to use recursion, sorting, searching, prefix trees (also knows as trie's), and dynamic programming as I was improving the run time of the program. So here is a summary of the work I did in trying to write a very optimal solution to the Boggle game: *Image courtesy: http://stackoverflow.com/questions/746082/how-to-find-list-of-possible-words-from-a-letter-matrix-boggle-solver The game of Boggle is played on a N x N board (usually made of cubes that has letters engraved on it). Given a dictionary, you will have to construct words on the board following these rules: i) The letters in the word must be "adjacent" to each other ii) Two letters on the board are "adjacent" if they are located on the board next to each other horizontally,Read full article from Exceptional Code: Solving the Boggle Game - Recursion, Prefix Tree, and Dynamic Programming
No comments:
Post a Comment