Method for finding connected subgraphs of graph added.