Skip to content
This repository was archived by the owner on Apr 9, 2024. It is now read-only.

Commit dc3d467

Browse files
authored
Update Tarjan.cpp
1 parent 850df16 commit dc3d467

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Graphs/Connectivity/Tarjan.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
* Tiempo: O(V + E)
1515
*/
1616
vector<vi> tarjan(vector<vi>& g) {
17-
int n = SZ(g);
17+
int n = SZ(g), timer = 0;
1818
vector<vi> scc;
1919
vi tin(n, -1), low(n, 0), vis(n, 0);
2020
stack<int> st;
21-
int timer = 0;
2221
auto dfs = [&](auto self, int u) -> void {
2322
tin[u] = low[u] = timer++;
2423
st.push(u);

0 commit comments

Comments
 (0)