xtralib
0.1.0
A simple header-based drop-in library
|
Trie (N-ary tree) structure and functions. More...
#include <xtra/common.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <wchar.h>
Go to the source code of this file.
Data Structures | |
struct | TrieNode |
Typedefs | |
typedef struct TrieNode | TrieNode |
Functions | |
TrieNode * | TrieNodeInit (wchar_t data, int numOfLetters) |
void | TrieNodeFree (TrieNode *node) |
TrieNode * | TrieInsert (TrieNode *root, wchar_t *word) |
Inserts word onto the trie. More... | |
TrieNode * | TrieDelete (TrieNode *root, wchar_t *word) |
Deletes words from trie. Will try to delete the word sequence from trie only if it ends up in a leaf node. | |
bool | TrieSearch (TrieNode *root, wchar_t *word) |
Searches for a given word. | |
void | TriePrint (TrieNode *root) |
bool | TriePrintSearch (TrieNode *root, wchar_t *word) |
Trie (N-ary tree) structure and functions.