From ee21a62ef6d9aca4fd8938a85af5ae02f7d29e19 Mon Sep 17 00:00:00 2001 From: Guilherme Werner Date: Sat, 10 Jun 2023 15:37:33 -0300 Subject: [PATCH] Update Graph.cpp --- Source/Graph.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Graph.cpp b/Source/Graph.cpp index e38af86..cbbea89 100644 --- a/Source/Graph.cpp +++ b/Source/Graph.cpp @@ -27,7 +27,7 @@ Graph *Graph::Clone() { Graph *graph = new Graph(length); - for (int i = 0; i < length; i++) + for (auto i = 0; i < length; i++) { for (auto j = adj[i].begin(); j != adj[i].end(); j++) { @@ -44,7 +44,7 @@ void Graph::DFS(int u, vector &disc, vector &low, vector &parent, disc[u] = low[u] = time; time += 1; - for (int v : adj[u]) + for (auto v : adj[u]) { // vertice não visitado if (disc[v] == -1) @@ -84,7 +84,7 @@ int Graph::DFSCount(int v, bool visited[]) void Graph::Print() { - for (int i = 0; i < length; i++) + for (auto i = 0; i < length; i++) { cout << "[" << i << "]: ";