NeetCode #613LC-305HardGraphsNC Algo100
← Back to All Problems#613 · #305 · Number of Islands II(岛屿数量 II)
📌 Problem Statement & Constraints
You are given
m, n and a list of positions where land is added one cell at a time. After each addition, return the number of islands. Constraints: 1 <= m, n <= 10^4, 1 <= positions.length <= 10^4, 1 <= m * n <= 10^4.🔒
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!