[Python] Clean DFS
\'area\' maps the id of an island to its area, and \'address\' maps each land piece to the id of the island that it belongs to.\n\nclass Solution:\n    def larg
**\'area\' maps the id of an island to its area, and \'address\' maps each land piece to the id of the island that it belongs to.**\n```\nclass Solution:\n    def largestIsland(self, grid: List[List[int]]) -> int:\n        N = len(grid)\n        DIRECTIONS = [(-1, 0), (0, -1), (0, 1), (1, 0)]\n        \n\t\taddress = {}\n        def dfs(row, column, island_id):\n            queue = deque([(row, column, island_id)])\n            visited.add((row, column))\n            area = 1\n            while queue: \n                row, column, island_id = queue.pop()\n                address[(row, column)] = island_id\n                for direction in DIRECTIONS:\n                    r, c = row + direction[0], column + direction[1]\n                    if r in range(N) and c in range(N) and grid[r][c] == 1 and (r, c) not in visited:\n                        queue.append((r, c, island_id))\n                        visited.add((r, c))\n                        area += 1\n            return area\n        \n        visited = set()\n        area = {}\n        island_id = 0\n        for row in range(N):\n            for column in range(N):\n                if grid[row][column] == 1 and (row, column) not in visited:\n                    area[island_id] = dfs(row, column, island_id)\n                    island_id += 1\n                    \n        if len(address.keys()) == N**2: return N**2   \n        \n        largest_area = 1\n        for row in range(N):\n            for column in range(N):\n                if grid[row][column] == 1: continue\n                neighbours = set()\n                large_area = 1\n                for direction in DIRECTIONS:\n                    r, c = row + direction[0], column + direction[1]\n                    if r in range(N) and c in range(N) and grid[r][c] == 1 and address[(r, c)] not in neighbours:\n                        neighbours.add(address[(r, c)])\n                        large_area += area[address[(r, c)]]\n                largest_area = max(largest_area, large_area)\n                \n        return largest_area\n```
['Depth-First Search', 'Iterator', 'Python', 'Python3']