Interview Coder drill
Interview Coder drill
Interview Coder drill
20:00
Given rows of 0s and 1s, count connected groups of 1s using horizontal and vertical neighbors. Print the count.
Example 1
Input: grid = ["11110","11010","11000","00000"]
Output: 1
All land cells connect into one island.
Constraints
Capture your plan, then rate how clearly you recalled it before submitting.