Transposing a Rectangular Quilt Preview Drops Tiles
Level 2 · node · Correctness · Rectangular matrix transposition
Scenario
A fictional quilt workshop stores tile plans as rows and columns. When the workbench preview changes orientation, each original column should become a new row. Some tiles disappear in wide layouts.
Requirements
Return an empty array for an empty layout, and return one output row for each column of a valid rectangular input.
Acceptance criteria
- Rows and columns are exchanged for a square layout.
- Wide layouts preserve every tile.
- Tall layouts preserve every tile.
- An empty layout returns an empty array.