Number of islands

0
Remix

Given a binary matrix, return how many islands it has: groups of 1 cells connected up, down, left or right (diagonals don't connect).

AmazonAppleGoogleMetaUberOnline assessmentLast asked Sep 2026
No answer yet. Write the first one; the best answer gets endorsed.