Count the Islands

Talk it through out loud with your AI coach.

The problem

  • medium
  • Pro

A map is a grid of land and water squares. An island is a group of land squares connected up, down, left or right. Count the islands. Explain your approach and its cost.