Skip to content

Pfeifenjoy/trie.h

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Trie.h

A small library which implements tries in C. The idea is that the trie only holds ssize_t values. Thus it can be used as an index for an array.

E.g:

#include "trie/trie.h"

int main(const int argc, const char **argv) {
	char **array; // my array of string e.g.: { "bar", ... }

	struct trie *trie = make_trie();

	trie_set(trie, "foo", 0);
	
	array[trie_get(trie, "foo")]; //-> "bar"

	trie_free(trie);
}

About

A trie library written in C

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published