Practica matemática discreta

Graph Cycle Detection

Browse Graph Cycle Detection lessons inside Algorithmic Thinking and Complexity.

1 lessons · 5 questions

Algorithmic Thinking and Complexity

Big-O, loop analysis, graph algorithms, invariants, and developer-focused discrete math.

1 lessons · 410 questions

Graph Cycle Detection

1 lessons · 5 questions

Least You Need to Know: Cycle Detection in Directed and Undirected Graphs

Cycle detection depends on graph type. In undirected graphs, you must ignore the edge back to the parent. In directed graphs, the key signal is whether DFS re-enters a node that is still on the current recursion path.

Abrir lección