Skip to content

Instantly share code, notes, and snippets.

View awreese's full-sized avatar

Drew Reese awreese

View GitHub Profile
@awreese
awreese / Dictionary.java
Last active December 8, 2016 17:19 — forked from prettymuchbryce/Dictionary.java
Dictionary with trie tree Java
//Dictionary implemented using a Trie Tree.
public class Dictionary {
private HashMap<Character,Node> roots = new HashMap<Character,Node>();
/**
* Search through the dictionary for a word.
* @param string The word to search for.
* @return Whether or not the word exists in the dictionary.
*/
public boolean search(String string) {