Skip to content

Instantly share code, notes, and snippets.

View rzhade3's full-sized avatar
💭
Watching Shogun

Rahul Zhade rzhade3

💭
Watching Shogun
View GitHub Profile
@rzhade3
rzhade3 / Trie.js
Last active August 15, 2020 07:44 — forked from tpae/Trie.js
Trie.js - super simple JavaScript implementation
// Trie.js - super simple JS implementation
// https://en.wikipedia.org/wiki/Trie
// -----------------------------------------
// we start with the TrieNode
class TrieNode {
constructor(key) {
// the "key" value will be the character in sequence
this.key = key;