Push adjacent nodes in the reversed graph to the queue , if not visited
if curr in graph_rev : NEW_LINE INDENT for i in range ( len ( graph_rev [ curr ] ) ) : NEW_LINE INDENT if ( not visited [ graph_rev [ curr ] [ i ] ] ) : NEW_LINE INDENT q . append ( graph_rev [ curr ] [ i ] ) ; NEW_LINE DEDENT DEDENT DEDENT