Solution: we can just use a simple iteration through the grid and look for islands. When we find an island, we can use a recursive helper function (dfs) to sum up all the connected pieces of land and return the total land mass of the island. As we t...
ruhulcse.hashnode.dev1 min read
No responses yet.