MaiDeveloper

Number of Islands in JavaScript

Given an m x n 2D binary grid, grid which represents a map of '1's (land) and '0's (water), return the number of islands.