Skip to content

Commit aaace5f

Browse files
committed
update trie test
1 parent cc5eb7f commit aaace5f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

PuzzleCoding/src/Trie.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public void getAllWords(StringBuilder path, ArrayList<String> words) {
121121

122122
}
123123

124-
}
124+
} // end of TrieNode class
125125

126126
private Node root;
127127

@@ -200,6 +200,12 @@ public static void main(String[] args) {
200200

201201
root.printTrie();
202202
System.out.println(list.toString());
203+
204+
System.out.println(root.contains("ppl", false));
205+
System.out.println(root.contains("arm", true));
206+
System.out.println(root.contains("appl", false));
207+
208+
203209
}
204210

205211
}

0 commit comments

Comments
 (0)