< Previous Next > 1858. Longest Word With All Prefixes (Medium) Related Topics [Depth-First Search] [Trie] Hints Hint 1 Add all the words to a trie. Hint 2 Check the longest path where all the nodes are words.