Fetching data...
This may take a moment
Back
2009. Longest Word With All Prefixes
Medium
Array
String
Depth-First Search
Trie
Solve on LeetCode
View Solutions
Description
Hints
Hint 1
Add all the words to a trie.
Hint 2
Check the longest path where all the nodes are words.
Similar Questions
Longest Word in Dictionary
Medium
Statistics
Acceptance
72.0%
Submissions
20,027
Accepted
14,429