Click here to see the full article post
The formatting for the Trie solution is off, would appreciate if you can fix it!
@yangshun I have fixed it. Thanks.
Excellent solution. However I want to mention that theoretically, approach 2 is no better than approach 1. Significantly better in practice though.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.