Problem 56473. IQpuzzler Preparation #2: Detect isolated zeros in a 2D matrix

Return true if any isolated single zeros are present in the input M-by-N matrix (zeros with all adjacent elements being non-zero).
Example:
[ 2 2 0
2 0 5 ==> true
5 5 5 ]
[ 2 2 3
0 0 5 ==> false
5 5 5 ]
Background:
This function can be useful in different board games, such as Go, or the upcoming IQpuzzler challenge.

Solution Stats

47.62% Correct | 52.38% Incorrect
Last Solution submitted on Aug 03, 2023

Problem Comments

Solution Comments

Show comments