NeetCode #590LC-1254MediumGraphs
← Back to All Problems#590 · #1254 · Number of Closed Islands(统计封闭岛屿的数目)
📌 Problem Statement & Constraints
Given an
m x n binary matrix grid, return the number of closed islands: maximal 4-directionally connected groups of 0s completely surrounded by 1s. Constraints: 1 <= m, n <= 100.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!