Tag - detect cycle in directed graph java

X