| Concept | Description |
|---|---|
| TrieNode | Contains children map and is_end flag |
| Insert | Create nodes for each character, mark end |
| Search | Traverse nodes, check is_end at last node |
| StartsWith | Traverse nodes, return true if all found |
| Prefix Search | Find node, then DFS to collect words |
| Operation | Time |
|---|---|
| Insert | O(m) |
| Search | O(m) |
| StartsWith | O(m) |
| Get all with prefix | O(m + k) |