Algorithm · Walmart Labs · Medium
Requirements Implement: matrix: char[][] contains 'B' for a filled square and 'W' for a blank square. rows: int[][] has one entry per matrix row and specifies that row's required contiguous black-segment lengths. columns: int[][] likewise has one entry per matrix column and specifies the required segments for that column. Return true only when the black-run lengths found in every row match rows[i] exactly and those found in every column match columns[j] exactly. A blank…
Checking your access…