> For the complete documentation index, see [llms.txt](https://emory.gitbook.io/dsa-java/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://emory.gitbook.io/dsa-java/graphs/exercises.md).

# 7.4. Quiz

## Implementation

* Create the [`GraphQuiz`](https://github.com/emory-courses/dsa-java/blob/master/src/main/java/edu/emory/cs/graph/GraphQuiz.java) class under the [`graph`](https://github.com/emory-courses/dsa-java/blob/master/src/main/java/edu/emory/cs/graph) package.
* Update the `numberOfCycles()` method that returns the number of all cycles in the graph.
* Make sure to find all atomic cycles; do not count cycles that can be created by simply combining other cycles.

{% embed url="<https://www.slideshare.net/jchoi7s/graphs-quiz>" %}

## Report

Write a report `quiz6.pdf` that includes the followings:

* Explain the worst-case complexity of the algorithm for your `numberOfCycle()` method.
* For the [`topological_sort()`](https://github.com/emory-courses/dsa-java/blob/master/src/main/java/edu/emory/cs/graph/Graph.java#L142) method in the `Graph` class, explain why the condition for the exception indicates that the graph includes a cycle.
