Path-based depth-first search for strong and biconnected components
The Design And Analysis Of Computer Algorithms