Problem
Design a trie with insert, search, and startsWith operations.
Example 1
Input: operations = ["Trie","insert","search","startsWith"]
Output: [null,null,true,true]
Constraints
- 1 <= word.length <= 2000
Notes
- Focus on the underlying trie pattern.
- Write the cleanest correct solution before optimizing further.
- Hidden tests cover larger edge cases than the visible examples.