Skip to content

Instantly share code, notes, and snippets.

@dxflygao
dxflygao / trie.c
Created November 13, 2012 07:32 — forked from devyn/trie.c
#include "trie.h"
void trie_create (trie_t **trie, char edgeName, trie_t *previousSibling, trie_t *parent)
{
*trie = calloc(1, sizeof(struct trie));
(*trie)->edgeName = edgeName;
if (previousSibling == NULL) {
if (parent != NULL) parent->firstChild = *trie;
@dxflygao
dxflygao / trie.c
Created November 13, 2012 07:32 — forked from devyn/trie.c
#include "trie.h"
void trie_create (trie_t **trie, char edgeName, trie_t *previousSibling, trie_t *parent)
{
*trie = calloc(1, sizeof(struct trie));
(*trie)->edgeName = edgeName;
if (previousSibling == NULL) {
if (parent != NULL) parent->firstChild = *trie;