Skip to content

Instantly share code, notes, and snippets.

View harshith-venkatesh's full-sized avatar
🏠
Working from home

Harshith Venkatesh harshith-venkatesh

🏠
Working from home
View GitHub Profile
@tpae
tpae / Trie.js
Created November 20, 2016 23:49
Trie.js - super simple JavaScript implementation
// Trie.js - super simple JS implementation
// https://en.wikipedia.org/wiki/Trie
// -----------------------------------------
// we start with the TrieNode
function TrieNode(key) {
// the "key" value will be the character in sequence
this.key = key;