We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c5c3a74 commit e22ea7eCopy full SHA for e22ea7e
graphs/Directed and Undirected (Weighted) Graph.py
@@ -152,6 +152,7 @@ def cycle_nodes(self):
152
parent = -2
153
indirect_parents = []
154
ss = s
155
+ on_the_way_back = False
156
anticipating_nodes = set()
157
158
while True:
@@ -199,6 +200,7 @@ def has_cycle(self):
199
200
201
202
203
204
205
206
@@ -367,6 +369,7 @@ def cycle_nodes(self):
367
369
368
370
371
372
373
374
375
@@ -414,6 +417,7 @@ def has_cycle(self):
414
417
415
418
416
419
420
421
422
423
0 commit comments