This implementation uses Tarjan's algorithm. The constructor takes time proportional to V + E (in
the worst case), where V is the number of vertices and E is the number of edges. Afterwards, the
id, count, and areStronglyConnected operations take constant time.
This implementation uses Tarjan's algorithm. The constructor takes time proportional to V + E (in the worst case), where V is the number of vertices and E is the number of edges. Afterwards, the id, count, and areStronglyConnected operations take constant time.