libreis  0.1.0
A simple header-based drop-in library
Functions
trie.c File Reference

Trie (N-ary tree) structure and functions. More...

#include <reis/trie.h>

Functions

trie_trsTrieInit (wchar_t data, int numOfLetters)
 
void rsTrieFree (trie_t *node)
 
trie_trsTrieInsert (trie_t *root, wchar_t *word)
 Inserts word onto the trie. More...
 
trie_trsTrieDelete (trie_t *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 rsTrieSearch (trie_t *root, wchar_t *word)
 Searches for a given word.
 
void rsTriePrint (trie_t *root)
 
bool rsTriePrintSearch (trie_t *root, wchar_t *word)
 

Detailed Description

Trie (N-ary tree) structure and functions.

Author
yung-turabian
Date
4 6 2024

Function Documentation

◆ rsTrieInsert()

trie_t* rsTrieInsert ( trie_t root,
wchar_t *  word 
)

Inserts word onto the trie.

Warning
Assumes word only has lower case characters.