Build an autocomplete

Is the board this build joins up. Its heap corner keeps the smallest number at the top and lists “top-K” among its uses; its trie corner spells “cat” and “car” down one shared path and says a trie is “perfect for AUTOCOMPLETE”. This lesson makes those two corners work as one machine.
Before you start. Clinic #23: Implement Trie built a trie: every stored word is a path from one starting node, one letter per step, words that begin alike share their start, and a flag marks the node where a word ends. Trees (BST, balancing, heaps, tries) and Shortest Paths, Worked (Dijkstra, Bellman-Ford, A*) used a heap: a tree kept so the smallest item always sits at the top, which is how Dijkstra’s search always knew the nearest unfinished town.