Thought Exercise: Detecting Cycles in Directed Graphs

Think about how to detect cycles in a directed graph.

We'll cover the following

Cycle detection

We’d like to be able to determine whether a given digraph contains a cycle. Can we apply the ideas learned in this chapter so far to do this?

Get hands-on with 1200+ tech skills courses.