Insert words one character per edge; shared prefixes share a path. Then walk search / startsWith / autocomplete and watch the traversed path and matching words light up.
search needs the final node to be an end-of-word; startsWith only needs the path to exist; autocomplete walks to the prefix then collects every end-of-word below it.
See junior.md and professional.md for why every operation is O(L), independent of the number of words.