connectedComponents - How can I find the connected components for a directed graph?