Add 'connected components' algo.