Variables to store if a node V has at - most one back edge and store the depth of the node for the edge
static int [ ] isPossible = new int [ MAX ] ; static int [ ] depth = new int [ MAX ] ; @ SuppressWarnings ( " unchecked " ) static ArrayList < Integer > [ ] adj = new ArrayList [ MAX ] ; static int [ ] vis = new int [ MAX ] ;