Algorithm · Waymo · Hard
Requirements Implement the following function: The function receives integer grid dimensions m and n and must return an $$m \times n$$ grid. Every cell must contain exactly one of the four labels 1, 2, 3, or 4. The returned grid must satisfy all of these conditions: Each label appears in exactly (m · n) / 4 cells. Assume m · n is divisible by 4; confirm this assumption with the interviewer. For every label, its cells form one 4-connected component, using only up, down, left,…
Checking your access…