Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BoggleSearch

This is the coding challenge assigned by Jobox. The detailed problem statement is described in problem.pdf. My approach is to use a Trie (Prefix tree) to store the dictionary followed by a depth frist search (DFS). The prefix tree provides an O(n) search time complexity where n is the length of the input word. Because a valid word is at least three characters long, I do not insert words less than 3 characters into the tree. DFS were performed on every character in the input test file (Default file name is test.txt). I constructed another grid to store the visited spots in the DFS, which costs additional O(m^2) space complexity for m x m matrix.

To run the program, use python main.py --testfile <filename>. For example if the input test file is test.txt, use python main.py --testfile test.txt.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages