To implement autocomplete, we start from the root of the trie, navigate to the node which holds the last letter of the prefix (the input string). From there, we call the recursive method to find all the nodes branched from the last node of prefix. This method is the same as pre-order of the tree from the root. The time complexity is O(n). n is the number of nodes included (Prefix and branches).