← Questions

Island at a given cell by BFS, then count the lakes inside it

0
GoogleCodingLast asked Oct 2026

A satellite image is a grid of characters: 'X' is land, '.' is water. Land cells that share an edge form one island; touching at a corner does not connect them.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 3 credits: each one unlocks a question for good.

Your code and the AI tutor open when you unlock this question.