public class Trie extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Trie.TrieNode |
| Constructor and Description |
|---|
Trie() |
| Modifier and Type | Method and Description |
|---|---|
void |
insert(String word) |
boolean |
search(String word) |
boolean |
search(String word,
Trie.TrieNode root,
int idx) |
boolean |
startsWith(String prefix) |
public void insert(String word)
public boolean search(String word)
public boolean search(String word, Trie.TrieNode root, int idx)
public boolean startsWith(String prefix)
Copyright © 2020. All rights reserved.