Company: Amazon_17may
Difficulty: medium
Warehouse Automation Domino Coloring A warehouse robotics platform models robot movement lanes as domino tiles laid over a 2 x n floor grid. The tiling is handed to you as an array domino of exactly two equal-length strings of English letters: domino[0] is the top row and domino[1] is the bottom row, so cell (r, i) carries the letter domino[r][i] . Every cell of the grid belongs to exactly one domino, and the two rows always describe a complete, non-overlapping tiling. A domino is read off the letters like this: Vertical domino at column i when domino[0][i] == domino[1][i] . It covers the two cells of that single column. Horizontal dominoes spanning columns i and i+1 when domino[0][i] != domino[1][i] . There are then two of them stacked: one covering (0, i) and (0, i+1) , the other covering (1, i) and (1, i+1) . In that case the input is guaranteed to satisfy domino[0][i] == domino[0][i+1] and domino[1][i] == domino[1][i+1] . Two dominoes are adjacent when they share a side — up, down,