The algorithm runs in two phases:
- grab an unseen node and perform depth-first search.
- add node to stack after children processed.
- while unseen nodes exist…
- pop node off stack.
- graph traversed against directed edges.
- all within traversal belong to one strongly-connected component.
- while stack is not empty…