src/components/Trie/index.js
// Builds the trie from the dictionary
Builds the trie from the dictionary
Builds the trie from the dictionary
buildTrie () {
        for ( let i = 0; i < dict.length; i++ ) {
            var each = dict[i].split(' ');
            for ( let word of each ) {
                map[word] = i;
                this.insert( word );
            }
        }
    }
buildTrie ( ) { for ( let i = 0 ; i < dict . length ; i ++ ) { var each = dict [ i ] . split ( ' ' ) ; for ( let word of each ) { map [ word ] = i ; this . insert ( word ) ; } } }
Builds the trie from the dictionary
Builds the trie from the dictionary