Skip to main content

Auto-complete

Learn Auto-complete (Trie, Advanced DSA) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Suggesting All Words That Complete a Prefix Given a prefix typed so far, find ALL stored words starting with it - walk the Trie down to the prefix's node in O(prefix length), then DFS from there collecting every complete word found below it.

More lessons in Trie