mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-08-02 19:46:40 +08:00
contents: rearrange algo layout structure
This commit is contained in:
@ -10,6 +10,14 @@ Tries are special trees (prefix trees) that make searching and storing strings m
|
||||
|
||||
Be familiar with implementing from scratch, a `Trie` class and its `add`, `remove` and `search` methods.
|
||||
|
||||
## Learning resources
|
||||
|
||||
- Readings
|
||||
- [Trying to Understand Tries](https://medium.com/basecs/trying-to-understand-tries-3ec6bede0014), basecs
|
||||
- [Implement Trie (Prefix Tree)](https://leetcode.com/articles/implement-trie-prefix-tree/), LeetCode
|
||||
- Additional (only if you have time)
|
||||
- [Compressing Radix Trees Without (Too Many) Tears](https://medium.com/basecs/compressing-radix-trees-without-too-many-tears-a2e658adb9a0), basecs
|
||||
|
||||
## Time complexity
|
||||
|
||||
`m` is the length of the string used in the operation.
|
||||
@ -20,14 +28,6 @@ Be familiar with implementing from scratch, a `Trie` class and its `add`, `remov
|
||||
| Insert | O(m) | |
|
||||
| Remove | O(m) | |
|
||||
|
||||
## Learning resources
|
||||
|
||||
- Readings
|
||||
- [Trying to Understand Tries](https://medium.com/basecs/trying-to-understand-tries-3ec6bede0014), basecs
|
||||
- [Implement Trie (Prefix Tree)](https://leetcode.com/articles/implement-trie-prefix-tree/), LeetCode
|
||||
- Additional (only if you have time)
|
||||
- [Compressing Radix Trees Without (Too Many) Tears](https://medium.com/basecs/compressing-radix-trees-without-too-many-tears-a2e658adb9a0), basecs
|
||||
|
||||
## Corner cases
|
||||
|
||||
- Searching for a string in an empty trie
|
||||
|
Reference in New Issue
Block a user