public boolean exist(char[][] board, String word) {
        if(board == null || board.length == 0 || word == null) return false;
        for (int i = 0; i < board.length; ++i) {
            for (int j = 0; j < board[0].length; ++j) {
                if (search(board, word, 0, i , j)) return true;
            }
        }
        return false;
    }