Implemented connected components
Implemented directed graph