Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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://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.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: