LeetCode 130: Surrounded Regions — Step-by-Step Visual Trace
Medium — Depth-First Search | Matrix | Graph Traversal | Flood Fill
The Problem
Given a 2D board containing 'X' and 'O', capture all regions of 'O' that are completely surrounded by 'X' by flipping them to 'X'. Regions connected to the border cannot ...
blog.tracelit.dev2 min read