We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
For people who actually used Trie (prefix-tree) structure.
Just to be careful that the answer only needs the count,
you don't need to enumerate/store the actual list of words with the given prefix.
That's how I first coded and Timed out many of the test cases.
Contacts
You are viewing a single comment's thread. Return to all comments →
For people who actually used Trie (prefix-tree) structure. Just to be careful that the answer only needs the count, you don't need to enumerate/store the actual list of words with the given prefix. That's how I first coded and Timed out many of the test cases.