work
This commit is contained in:
parent
cdb0f61d7a
commit
fb2d02eb79
|
@ -0,0 +1,22 @@
|
||||||
|
#ifndef TRANSFORM_H
|
||||||
|
#define TRANSFORM_H
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#define ALPHABET_SIZE 26
|
||||||
|
|
||||||
|
typedef struct TrieNode {
|
||||||
|
bool isEndOfWord;
|
||||||
|
struct TrieNode* children[ALPHABET_SIZE];
|
||||||
|
} TrieNode;
|
||||||
|
|
||||||
|
TrieNode* createNode();
|
||||||
|
void insert(TrieNode* root, const char* word);
|
||||||
|
bool search(TrieNode* root, const char* word);
|
||||||
|
void freeTrie(TrieNode* node);
|
||||||
|
void TestRadixTree(void);
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue