4 ms·
Look up the connected regions algorithm (DFS), it might be useful. Here's an example https://en.m.wikipedia.org/wiki/Connected-component_labeling https://en.m
by KRAKRISMOTT 3y ago
Look up the connected regions algorithm (DFS), it might be useful.
Here's an example
https://en.m.wikipedia.org/wiki/Connected-component_labeling https://en.m.wikipedia.org/wiki/Connected-component_labeling
https://scikit-image.org/docs/stable/api/skimage.measure.html#skimage.measure.label https://scikit-image.org/docs/stable/api/skimage.measure.htm...
I guess you are doing the same thing and memoizing the graph ahead of time. Perhaps find an optimized implementation in wasm and save yourself some maintenance time.