Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 1d 16h 01m 44s1 days 16 hours 1 minutes 44 seconds.
Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 1d 16h 01m 44s1 days 16 hours 1 minutes 44 seconds.

Sign in to watch this lesson
Advanced - Graphs · 4:34
A strongly connected component is a maximal set of vertices that all reach each other; the components partition the graph, and shrinking each to a point gives the condensation, which is always a DAG. Kosaraju's algorithm finds them with two depth-first searches: record finishing order, then search the reversed graph in decreasing finishing order, getting the components in topological order. Tarjan's one-pass algorithm uses low values and a stack and closes them in reverse order.