In the map given here, a 0
represents water and a 1
represents land. An island is a
contiguous piece of land, surrounded by water on all sides. How can we
determine how many islands there are in this area?
Use a breadth-first search strategy to identify how many islands there are in the area.