This commit is contained in:
nyym 2023-06-26 18:31:16 +08:00
parent cdb0f61d7a
commit fb2d02eb79
1 changed files with 22 additions and 0 deletions

View File

@ -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