typedef struct trie_node_t trie_node_t; struct trie_node_t { /* Value associated with key (set if end_of_word = 1) */ void* value; /* 1 if current node marks the end of a word, 0 otherwise */ int end_of_word; trie_node_t** children; int n_children; }; typedef struct trie_t trie_t; struct trie_t { trie_node_t* root; /* Number of keys */ int size; /* Generic Data Structure */ int data_size; /* Trie-Specific, alphabet properties */ int alphabet_size; char* alphabet; /* Callback to free value associated with key, should be called when freeing */ void (*free_value_cb)(void*); /* Optional - number of nodes, useful to test correctness */ int nNodes; };