#include #include #include #include #include #include "trie.h" void predict(Trie t, char *keypad[], char *keyPresses); int main(void) { char *keypad[] = { [0] = "", [1] = "", [2] = "abc", [3] = "def", [4] = "ghi", [5] = "jkl", [6] = "mno", [7] = "pqrs", [8] = "tuv", [9] = "wxyz", }; Trie t = trieNew(); char *keys[] = { "hive", "five", "goop", "good", "gold", "home", "hood", "hoof", "horn", "hoop", "mood", "goodie" }; for (int i = 0; i < 12; i++) { trieInsert(t, keys[i]); } predict(t, keypad, "4663"); trieFree(t); } void predict(Trie t, char *keypad[], char *keyPresses) { // TODO }