@@ -0,0 +1,1303 @@
+public class Trie %7B%0A%0A  class Node %7B%0A    char letter;%0A    HashMap%3CCharacter, Node%3E map;%0A    boolean complete;%0A%0A    public Node(char letter) %7B%0A      this.letter = letter;%0A      map = new HashMap%3CCharacter, Node%3E();%0A      complete = false;%0A    %7D%0A  %7D%0A%0A  Node root;%0A%0A  public Trie() %7B%0A    this.root = new Node('*');%0A  %7D%0A%0A  public void insert(String word) %7B%0A    Node node = this.root;%0A    int count = 0;%0A%0A    for (char c : word.toCharArray()) %7B%0A      if (!node.map.containsKey(c)) %7B%0A        node.map.put(c, new Node(c));%0A      %7D%0A%0A      node = node.map.get(c);%0A      if (count == word.length() - 1) %7B%0A        node.complete = true;%0A      %7D%0A      count ++;%0A    %7D%0A  %7D%0A%0A  public boolean search(String word) %7B%0A    Node node = this.root;%0A    int count = 0;%0A    while (count %3C word.length()) %7B%0A      char letter = word.charAt(count);%0A      if (!node.map.containsKey(letter)) %7B%0A        return false;%0A      %7D%0A      node = node.map.get(letter);%0A      count++;%0A    %7D%0A%0A    return node.complete;%0A  %7D%0A%0A  public boolean startsWith(String prefix) %7B%0A    Node node = this.root;%0A    int count = 0;%0A    while (count %3C prefix.length()) %7B%0A      char letter = prefix.charAt(count);%0A      if (!node.map.containsKey(letter)) %7B%0A        return false;%0A      %7D%0A      node = node.map.get(letter);%0A      count++;%0A    %7D%0A    return true;%0A  %7D%0A%7D

Add trie 208;