In graph theory, a graph has nodes and edges. Each edge has two nodes. A directed graph means the two nodes that an edge refers to represent "from" and "to" nodes.

A cycle means node A points to node B and node B points to node A. (Or more complex, A->B->C->A, etc.)

How can you figure out if a graph has any cycles? Plan out how the code would do this, and come to me before writing any actual code.