Search
⌘K

Leetcode 533. Lonely Pixel II

Given an m×n grid of 'B' and 'W' and an integer N, count black pixels at (i,j) such that row i and column j each contain exactly N black pixels and every row that has a black pixel in column j is identical to row i. The core challenge is grouping identical row patterns and combining those groups with column counts to identify qualifying pixels.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.