I wanted to find number of connected components in a directed graph but if we try using the general method that traverse nodes from 1 to n and for each node reach all its connected nodes and if we find any unreached node then we will take that node as another component.
.In this example , at least one of 4 or 7 can not be traversed as same (and will only be visited when started from there). So show me the algo that can consider it as the same component of a graph.