2 ms·
> The article doesn't contain a concise pseudo-code description of the algorithm but instead sneaks up on it by throwing in lots of python that implements vario
by dahart 8y ago
> The article doesn't contain a concise pseudo-code description of the algorithm but instead sneaks up on it by throwing in lots of python that implements various graph operations.
True, that's really a lot of code while failing to outline the simple algorithm or concisely describe the basic idea. It doesn't mention complexity either, which is linear.
It might also help beginners to mention the image analogue, i.e. connected components of a regular grid graph, which is called 'flood fill'.
> In case people are wondering, the algorithm is 'connected clustering'
FWIW, I've always heard the algorithm called 'connected components', and a quick Google search on both terms gives me more relevant hits for 'connected components'. In fact, I don't get a single directly relevant hit that describes this algorithm on the first page for 'connected clustering'.