Logo

Programming-Idioms

  • C++

Idiom #159 Trie

Define a Trie data structure, where entries have an associated value.
(Not all nodes are entries)

struct Trie
{
    Rune c;
    Trie*[Rune] children;
    bool isEntry;
    bool value;
}

New implementation...
< >
programming-idioms.org