Relative Content

Tag Archive for pythondynamic-programmingdepth-first-searchundirected-graphcycle-detection

Detect Cyclic Islands on a Matrix

On a binary matrix M, a cyclic island is a region of 1s where the region encircles itself (horizontal, vertical and cross directions are allowed)