Concept Flow - Autocomplete System with Trie
Start: Insert words into Trie
For each word: For each char
If char node missing: Create node
Move to next char node
Mark end of word
End Insert
Start Autocomplete Query
Traverse Trie for prefix chars
If prefix node missing: Return empty
From prefix node: DFS to find all words
Return list of words
Insert words character by character into the Trie, creating nodes as needed. For autocomplete, traverse the Trie by prefix, then collect all words below that prefix.