16 lines
528 B
C
16 lines
528 B
C
#ifndef TRIE_INCLUDED
|
|
#define TRIE_INCLUDED
|
|
#include <stdbool.h>
|
|
#include "vec.h"
|
|
typedef struct TrieNode TrieNode;
|
|
|
|
TrieNode *new_trie_node(void);
|
|
bool trie_insert(TrieNode **root, char *signedText);
|
|
bool trie_search(TrieNode *root, char *signedText);
|
|
TrieNode* find_node(TrieNode* root, char *signedText);
|
|
int collect_leaves(TrieNode *node, unsigned char *prefix, int len,Vec *v);
|
|
void print_trie_rec(TrieNode *node, unsigned char *prefix, int len);
|
|
void print_trie(TrieNode *node);
|
|
void free_trienode(TrieNode* node);
|
|
#endif
|