previous | start | next

Data structures after second step

After D is output, two new vertices have indegree 0 in HashMap degreeOf and so are added to zeroDegree.

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.



previous | start | next