NeetCode #568LC-1905MediumGraphs
← Back to All Problems#568 · #1905 · Count Sub Islands(统计子岛屿)
📌 Problem Statement & Constraints
You are given two
m x n binary grids grid1 and grid2. An island in grid2 is a sub-island if all of its cells are also land in grid1. Return the number of sub-islands in grid2. Constraints: 1 <= m, n <= 500.🔒
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!