disRev stores two values - distance and back edge count from root node
pair [ ] disRev = new pair [ V ] ; for ( int i = 0 ; i < V ; i ++ ) disRev [ i ] = new pair ( 0 , 0 ) ; Boolean [ ] visit = new Boolean [ V ] ; int u , v ; for ( int i = 0 ; i < e ; i ++ ) { u = edges [ i , 0 ] ; v = edges [ i , 1 ] ;