let Trie = require("simple-trie-js");
let trie = new Trie();
trie.add_word("hello");
trie.add_word("world");
console.log(trie.search_word("hello") ? "Found!" : "Not Found!");
console.log(trie.search_word("hell") ? "Found!" : "Not Found!");
trie.delete_word("hello");
console.log(trie.search_word("hello") ? "Found!" : "Not Found!");
-
Notifications
You must be signed in to change notification settings - Fork 0
night-fury-me/trie-js
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A simple implementation of Trie data structure in JS
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published