public boolean exist1(char[][] board, String word) {

        if (board == null || board.length == 0) {
            return false;
        }
        if (word == null || word.length() == 0) {
            return true;
        }
        boolean[][] visited = new boolean[board.length][board[0].length];

        for (int i = 0; i < board.length; i++) {
            for (int j = 0; j < board[0].length; j++) {
                if (board[i][j] == word.charAt(0)) {
                     if (visit(board, visited, i, j, word, 0)) {
                        return true;
                    }
                 }
            }
        }
        return false;
    }