If two courses list each other as a coreq, for the sake of graph traversal, remove one of the relationships from the graph representation to avoid a cycle. Keep the relationship stored on the data side. That is, in the requisites array on each course.
If two courses list each other as a coreq, for the sake of graph traversal, remove one of the relationships from the graph representation to avoid a cycle. Keep the relationship stored on the data side. That is, in the requisites array on each course.