Back to problems

Black Cell Covering Block List

Algorithm · Square · Easy

You are given two integers m and n representing the dimensions of a grid, and a 2D array coordinates where each element [x, y] indicates a black cell at row x and column y. All other cells are white. A 2×2 block is a contiguous subgrid of size 2×2. Its top-left corner is at [x, y] with $$0 \le x , ". Return a list of lists of such strings, one list per input black cell, in any order. Constraints: $$2 \le m, n \le 10^5$$ 1 ≤ coordinates.length ≤ 10^5 0 ≤ coordinates[i][0] < m…

Checking your access…