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 ] ; static ArrayList adj = new ArrayList ( ) ; static int [ ] vis = new int [ MAX ] ; class pair { public int first , second ; public pair ( int first , int second ) { this . first = first ; this . second = second ; } }