adding longest common prefix problem

This commit is contained in:
Jidong Xiao
2023-12-05 00:34:34 -05:00
parent b8d4a9ff29
commit 4dc95af0e6
2 changed files with 92 additions and 2 deletions

View File

@@ -100,9 +100,8 @@ for the key (or NULL or a special value, e.g., -1, if the path to that poi
- What is the worst case # of children for a single node? What are the member variables for the Node class?
- Unlike a hash table, we can iterate over the keys in a trie / prefix tree in sorted order.
Exercise: Implement the trie sorted-order iterator (in code or pseudocode) and print the table on the right.
## 27.8 Leetcode Exercises
- [Leetcode problem 208: Implement Trie (Prefix Tree)](https://leetcode.com/problems/implement-trie-prefix-tree/). Solution: [p208_trie.cpp](../../leetcode/p208_trie.cpp).
- [Leetcode problem 14: Longest Common Prefix](https://leetcode.com/problems/longest-common-prefix/). Solution: [p14_longest_common_prefix.cpp](../../leetcode/p14_longest_common_prefix.cpp).