This is an Object Oriented implementation of a Trie in python. The class contains setter and getter methods, and implements several useful functionalities. In addition, the class can generate graphviz dot code, which can be used to visualize the Trie.
Instructions:
- Use Sublime Text (or your favorite python IDE) to edit / execute the code
- Add graphviz (https://pypi.python.org/pypi/graphviz) to python
- Install Graphviz (graphviz.org) and add it to PATH
- Use the light and capable Sumatra PDF reader to view your graphs (http://www.sumatrapdfreader.org/free-pdf-reader.html)
Credits:
- I thank www.wordfrequency.info for providing the list with the top 5000 words of the English language