algorithm to detect pools of 0s in a matrix
I’m writing an algorithm that detects regions of contiguous empty cells that are completely surrounded by filled cells and do not extend to the edge of the grid. Let’s call such regions “pools”.
I’m writing an algorithm that detects regions of contiguous empty cells that are completely surrounded by filled cells and do not extend to the edge of the grid. Let’s call such regions “pools”.