A Pen by Suyash Gulati on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Classic Trie tree implementation for a dictionary that also supports wildcard search | |
class TrieNode { | |
constructor(isEndOfWord = false) { | |
this.isEndOfWord = isEndOfWord; | |
this.children = {}; | |
} | |
} |