tiny-trie-ts
v1.0.6
Published
Simple [trie](https://en.wikipedia.org/wiki/Trie) data structure implemented in TypeScript.
Downloads
1
Readme
tiny-trie-ts
Simple trie data structure implemented in TypeScript.
Test
pnpm test
API
const { Trie } = require('tiny-trie-ts');
const trie = new Trie();
trie.insert(key, value);
trie.find(key);
trie.keysWithPrefix(prefix);
trie.serialize();
trie.deserialize(serialized);
The serialize
and deserialize
algorithm is variant of serialize-deserialize-n-ary-tree