Two differents ways to comute connected components