_searchBFS(pos, prefixNode, visitedPositions, path) {
        if(prefixNode.isWord && !this.#_result[prefixNode.value]) {
            this.#_result[prefixNode.value] = {
                value: prefixNode.value,
                visitedPositions: $.extend(true, {}, visitedPositions)
            };
        }
        path.push(pos);
        let self = this;
        this.#_neighboursCells.forEach(function(cords) {
            let cellPosition = [pos[0] + cords[0], pos[1] + cords[1]];
            if(self._inBoard(self._board, cellPosition[0], cellPosition[1]) && visitedPositions.containsArray(cellPosition) === -1) {

                let letter = self._board[cellPosition[0]][cellPosition[1]];
                let childNode = prefixNode.getChild(letter);

                if(!childNode || childNode === undefined) {
                    return;
                }
                
                visitedPositions.push(cellPosition);
                self._searchBFS(cellPosition, childNode, visitedPositions, path);
                visitedPositions.pop();

            }
        });
        path.pop(pos);
    }
/**
    * Using Breadth First Search (BFS) algorithm to find all posible combinations of characters in length between 3 <= 16
    * Using Trie Data Structure for max optimization this let us to search fast in large data
    */
Using Breadth First Search (BFS) algorithm to find all posible combinations of characters in length between 3 <= 16
Using Trie Data Structure for max optimization this let us to search fast in large data
Using Breadth First Search ( BFS ) algorithm to find all posible combinations of characters in length between 3 < = 16 Using Trie Data Structure for max optimization this let us to search fast in large data
_searchBFS(pos, prefixNode, visitedPositions, path) {
        if(prefixNode.isWord && !this.#_result[prefixNode.value]) {
            this.#_result[prefixNode.value] = {
                value: prefixNode.value,
                visitedPositions: $.extend(true, {}, visitedPositions)
            };
        }
        path.push(pos);
        let self = this;
        this.#_neighboursCells.forEach(function(cords) {
            let cellPosition = [pos[0] + cords[0], pos[1] + cords[1]];
            if(self._inBoard(self._board, cellPosition[0], cellPosition[1]) && visitedPositions.containsArray(cellPosition) === -1) {
                let letter = self._board[cellPosition[0]][cellPosition[1]];
                let childNode = prefixNode.getChild(letter);
                if(!childNode || childNode === undefined) {
                    return;
                }
                visitedPositions.push(cellPosition);
                self._searchBFS(cellPosition, childNode, visitedPositions, path);
                visitedPositions.pop();
            }
        });
        path.pop(pos);
    }
_searchBFS ( pos , prefixNode , visitedPositions , path ) { if ( prefixNode . isWord && ! this . #_result [ prefixNode . value ] ) { this . #_result [ prefixNode . value ] = { value : prefixNode . value , visitedPositions : $ . extend ( true , { } , visitedPositions ) } ; } path . push ( pos ) ; let self = this ; this . #_neighboursCells . forEach ( function ( cords ) { let cellPosition = [ pos [ 0 ] + cords [ 0 ] , pos [ 1 ] + cords [ 1 ] ] ; if ( self . _inBoard ( self . _board , cellPosition [ 0 ] , cellPosition [ 1 ] ) && visitedPositions . containsArray ( cellPosition ) === - 1 ) { let letter = self . _board [ cellPosition [ 0 ] ] [ cellPosition [ 1 ] ] ; let childNode = prefixNode . getChild ( letter ) ; if ( ! childNode || childNode === undefined ) { return ; } visitedPositions . push ( cellPosition ) ; self . _searchBFS ( cellPosition , childNode , visitedPositions , path ) ; visitedPositions . pop ( ) ; } } ) ; path . pop ( pos ) ; }
Using Breadth First Search (BFS) algorithm to find all posible combinations of characters in length between 3 <= 16
 Using Trie Data Structure for max optimization this let us to search fast in large data
Using Breadth First Search ( BFS ) algorithm to find all posible combinations of characters in length between 3 < = 16 Using Trie Data Structure for max optimization this let us to search fast in large data