grid is a square list of lists of 0 (water) and 1 (land) containing exactly two islands, where an island is a maximal group of 1s connected horizontally or vertically. Implement:
find_island(grid)
(row, col) tuples of every cell in its island, found by depth-first search. Return a Python set.shortest_bridge(grid)
1 so that the two islands become one island.The grid is never modified by either function.