Leetcode 1591. Strange Printer II
Given a target m×n grid, determine whether you can produce it by printing each color at most once as a solid axis-aligned rectangle that may cover previously printed cells — equivalently, compute each color’s bounding rectangle, add a dependency edge when one color appears inside another’s rectangle, and return true iff this partial order has no cycles (i.e., a valid topological print order exists).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.