Vertices C and G were added to zeroDegree since their degrees in the HashMap degreeOf just became 0.
The next node to be output will be C.