You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 10, 2020. It is now read-only.
If DDCD did its work correctly, DFS will never backtrack. Will need to construct a test where a link disappears early enough to trigger a backtrack, but late enough so not the whole tree crumbles down.
http://www.geeksforgeeks.org/detect-cycle-direct-graph-using-colors/ distinguishes between tree edges (the ones visited first), back-edges (ones that close a cycle, given the tree edges), cross-edges (connects two nodes with common ancestors), and forward edges (from ancestor to descendant).
In this graph, node C would falsely conclude it found a cycle (it should mark the treeToken as already backtracked):
The text was updated successfully, but these errors were encountered: