This file contains hidden or 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
class Node { | |
constructor(character) { | |
this.edges = {}; | |
this.data = undefined; // where we will store the flag data / capitalized names | |
this.character = character; | |
this.endOfWord = false; | |
} | |
} | |
export default class Trie extends Node { |