Skip to content

Commit 756b95c

Browse files
authored
Update shortest-cycle-in-a-graph.cpp
1 parent 579150d commit 756b95c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/shortest-cycle-in-a-graph.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ class Solution {
1414
}
1515
const auto& bfs = [&](int u) {
1616
vector<int> dist(n, INF);
17-
vector<int> q = {u};
1817
dist[u] = 0;
18+
vector<int> q = {u};
1919
while (!empty(q)) {
2020
vector<int> new_q;
2121
for (const auto& u : q) {

0 commit comments

Comments
 (0)