File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,8 @@ export function getNodes(root, word) {
70
70
return result ;
71
71
}
72
72
73
+ const alphabet = [ ..."abcdefghijklmnopqrstuvwxyz" ] ;
74
+
73
75
/**
74
76
* Returns the longest paths matching a prefix of the input word including wildcards.
75
77
* @param { LetterNode } root
@@ -89,7 +91,7 @@ export function getNodesWithWildcards(root, word) {
89
91
console . log ( remaining ) ;
90
92
// Get all the possible nodes that can act as roots for the new word
91
93
/** @type LetterNode[] */
92
- const roots = [ ... "abcdefghijklmnopqrstuvwxyz" ] . map ( k => current [ k ] ) . filter ( r => r !== undefined ) ;
94
+ const roots = alphabet . map ( k => current [ k ] ) . filter ( r => r !== undefined ) ;
93
95
// console.log(roots);
94
96
95
97
// If there aren't any further nodes, just return the result we have
You can’t perform that action at this time.
0 commit comments