Bloomberg·Software Engineer·Technical Phone Screen
- Given an m x n grid of land and water cells, find all islands (4-connected groups of land). Then, given an array of target sizes, return an array where each entry is the count of islands whose size exactly matches the corresponding target.
“It's Number of Islands but you can't just count them, you need to track the size of each one.”