private void dfs(Digraph<?> G, Object v) {

        this.marked.put(v, true);
        this.reachable.add(v);

        for (Object temp : G.getAdjacentVertices(v)) {
            if (!marked.get(temp)) {
                dfs(G, temp);
            }
        }
    }