Finding the maximum and minimum values in each component
componentMax = max ( componentMax , u ) NEW_LINE componentMin = min ( componentMin , u ) NEW_LINE for i in range ( len ( adj [ u ] ) ) : NEW_LINE INDENT if ( visited [ adj [ u ] [ i ] ] == False ) : NEW_LINE INDENT visited , componentMax , componentMin = DFSUtil ( adj [ u ] [ i ] , adj , visited , componentMin , componentMax ) NEW_LINE DEDENT DEDENT return visited , componentMax , componentMin NEW_LINE