
- The algorithm ends when all previous elements in zeroDegree have been
processed and the list is empty.
- However, 4 vertices have not been output.
- The degrees of these 4 vertices in the degreeOf HashMap are not
0.
- This means a cycle exists among those 4 nodes.