Easy
Accuracy: 55.68%
Points: 2
Given a binary matrix contains 0s and 1s only, we need to find the sum of coverage of all zeros of the matrix where coverage for a particular 0 is defined as a total number of ones around a zero in left, right, up and bottom directions.
Input : matrix = [[0, 1, 0], [0, 1, 1], [0, 0, 0]] Output : 6 Explanation: There are a total of 6 coverage are there
Input: matrix = [[0, 1]] Output: 1 Explanation: There are only 1 coverage.
O(n * m)
O(1)
1 <= matrix.size, matrix[0].size <= 100