Number of Islands II
CodingPhoneSoftware EngineerReported Aug, 2026
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...