Skip to content

A simple implementation of Trie data structure in JS

Notifications You must be signed in to change notification settings

night-fury-me/trie-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

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!");

About

A simple implementation of Trie data structure in JS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published