0533. Lonely Pixel II
https://leetcode.com/problems/lonely-pixel-ii
Description
Given an m x n picture consisting of black 'B' and white 'W' pixels and an integer target, return the number of black lonely pixels.
A black lonely pixel is a character 'B' that located at a specific position (r, c) where:
Row
rand columncboth contain exactlytargetblack pixels.For all rows that have a black pixel at column
c, they should be exactly the same as rowr.
Example 1:
Example 2:
Constraints:
m == picture.lengthn == picture[i].length1 <= m, n <= 200picture[i][j]is'W'or'B'.1 <= target <= min(m, n)
ac
Last updated
Was this helpful?