Google Interview Question

Given a dictionary of words, write a function that would autocomplete word prefixes.