connected component for undirected graph
learning c++11 multithreading