531. Lonely Pixel I

Given an m x n picture consisting of 'B' (black) and 'W' (white) characters, find the number of lonely black pixels. A black pixel is lonely if it is the only 'B' in its entire row and its entire column.

Examples
Input: [["W","B"],["B","W"]]
Output: 2
Hints
Related Problems

531. Lonely Pixel I

Given an `m x n` picture consisting of 'B' (black) and 'W' (white) characters, find the number of lonely black pixels. A black pixel is lonely if it is the only 'B' in its entire row and its entire column.