tiny-trie-js
v1.0.4
Published
Simple [trie](https://en.wikipedia.org/wiki/Trie) data structure implemented in JavaScript.
Downloads
2
Readme
tiny-trie-js
Simple trie data structure implemented in JavaScript.
Test
npm test
API
const { Trie } = require('tiny-trie-js');
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