Spot the bug: Number of Islands that crashes on the edge

medium
Grid DFS

Bug 7 of 12

This Python solution is supposed to do the following: grid is a list of rows of "1" (land) and "0" (water). Return the number of islands. It has one bug. Find the line in two tries.

Tap the line with the bug

2 tries left

FAQ