← Amazon questions

Find number of islands and the size of each island

Filed under Amazon

Given a 2D grid of 1s (land) and 0s (water), determine the total number of connected islands as well as the individual size of every island.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.