Package com.util.lodash
Class Trie
- java.lang.Object
-
- com.util.lodash.Trie
-
public class Trie extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Trie.TrieNode
-
Constructor Summary
Constructors Constructor Description Trie()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
insert(java.lang.String word)
boolean
search(java.lang.String word)
boolean
search(java.lang.String word, Trie.TrieNode root, int idx)
boolean
startsWith(java.lang.String prefix)
-
-
-
Method Detail
-
insert
public void insert(java.lang.String word)
-
search
public boolean search(java.lang.String word)
-
search
public boolean search(java.lang.String word, Trie.TrieNode root, int idx)
-
startsWith
public boolean startsWith(java.lang.String prefix)
-
-