public static void ShowMarked(this DiGraph dg) { Console.Write("Marked: "); DirectedDFS reachable = new DirectedDFS(dg, dg.V); for (int v = 0; v < dg.V; v++) if (reachable.Marked(v)) Console.Write(v + " "); Console.WriteLine(); }
public static void ShowMarked(this DiGraph dg) { Console.Write("Marked: "); DirectedDFS reachable = new DirectedDFS(dg, dg.V); for (int v = 0; v < dg.V; v++) { if (reachable.Marked(v)) { Console.Write(v + " "); } } Console.WriteLine(); }