(string)
| 5 | this.endSymbol = "*"; |
| 6 | } |
| 7 | add(string) { |
| 8 | let currentNode = this.root; |
| 9 | for (const char of string) { |
| 10 | if (!currentNode.hasOwnProperty(char)) currentNode[char] = {}; |
| 11 | currentNode = currentNode[char]; |
| 12 | } |
| 13 | currentNode[this.endSymbol] = string; |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | function boggleBoard(board, words) { |
no outgoing calls
no test coverage detected