Concept Flow - Longest Word in Dictionary Using Trie
Build Trie from words
Insert each word letter by letter
Mark end of word nodes
Start DFS from root
For each child node
Check if node is end of a word
Update longest word if longer
Return longest word found
Build a trie from the dictionary words, then use depth-first search to find the longest word where all prefixes are present.