Number of Islands II
CodingOnsiteSoftware EngineerReported Jun, 2026Medium Frequency
Company question banks are included with the Insider plan.
You are given an empty m x n grid initially filled with water. We may perform an addLand operation where positions[i] = [ri, ci] turns the cell (ri, ci) into land.
Return an array answer...