Skip to content

Commit e86d188

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

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
@@ -20,7 +20,7 @@ class Solution {
2020
vector<int> new_q;
2121
for (const auto& u : q) {
2222
for (const auto& v : adj[u]) {
23-
if (dist[v] == dist[u] - 1) {
23+
if (dist[v] == dist[u] - 1) { // v == p
2424
continue;
2525
}
2626
if (dist[v] != INF) {

0 commit comments

Comments
 (0)