private void DFS(Digraph G, int s) { Marked[s] = true; foreach (var item in G.Adj(s)) { if (!Marked[item]) { DFS(G, item); } } }
private void DFS(Digraph G, int v) { Marked[v] = true; id[v] = count; foreach (var w in G.Adj(v)) { if (!Marked[w]) { DFS(G, w); } } }