Connected Component Labeling in JavaScript With Union-Find Datastructure

2022-09-19

Click on a cell to swap its value between 0 and 1. Each time you change the grid, the cpu will label all separate regions.


As usual, the code is all in one HTML file, which you can view by pressing F12 in Chrome and going to "Sources".