If there is a reverse edge from u to i , then only update
if ( g [ u ] [ i ] [ 1 ] ) : NEW_LINE INDENT disRev [ v ] [ 1 ] = disRev [ u ] [ 1 ] + 1 NEW_LINE totalRev += 1 NEW_LINE DEDENT totalRev += dfs ( g , disRev , visit , v ) NEW_LINE