public boolean exist(char[][] board, String word) {
        if(word.length()  == 0)
            return true;
        if((board.length ==0  || board[0].length ==0) && word.length() != 0)
            return false;
        m = board.length;
        n = board[0].length;
        use = new int[m][n];
        for(int i = 0; i < m;i++)
            for(int j =0 ; j < n; j++){
                if(board[i][j] == word.charAt(0)){
                    if(word.length() == 1 ||  dfs(board,word.substring(1),i,j))
                        return true;
                }

            }
        return false;
    }