MetaFrontend Engineer · OnsiteCodemia practicePlace Widgets on a Dashboard Grid Satisfying Row and Column Orders
Place k widgets numbered 1..k on a k by k grid, one per row and one per column, given row constraints [a, b] (a must be in a strictly higher row than b) and column constraints [l, r] (l must be strictly left of r). Return any valid grid with zeros in empty cells, or an empty list if impossible.