public boolean exist2(char[][] board, String word) {
        m = board.length;
        n = board[0].length;
        visited = new boolean[m][n];
        for(int i = 0; i < m; ++i){
            for(int j = 0; j < n; ++j){
                if(exist2Rec(board, word, 0, i, j))
                    return true;
            }
        }
        return false;
    }