Tap here to switch tabs
Problem
Submissions

Problem: Number of Islands II

Number of Islands II starts with an all-water grid and adds land at given positions. Return the island count after each operation, with connections allowed only horizontally or vertically.
⋮
Tap here to switch tabs
Problem
Submissions

Problem: Number of Islands II

Number of Islands II starts with an all-water grid and adds land at given positions. Return the island count after each operation, with connections allowed only horizontally or vertically.