0531. Lonely Pixel I
Last updated
Last updated
https://leetcode.com/problems/lonely-pixel-i
Given an m x n
picture
consisting of black 'B'
and white 'W'
pixels, return the number of black lonely pixels.
A black lonely pixel is a character 'B'
that located at a specific position where the same row and same column don't have any other black pixels.
Example 1:
Example 2:
Constraints:
m == picture.length
n == picture[i].length
1 <= m, n <= 500
picture[i][j]
is 'W'
or 'B'
.