A plant nursery has a display with 2 rows and displayLength columns of square spaces. Count the different layouts that fill the display with planter trays.
int countLayouts(int displayLength)
displayLength: the number of columns.1,000,000,007.2 × 2 block.2 × 2 block. Any of its four rotations may be used.1 ≤ displayLength ≤ 1,000,000countLayouts(displayLength = 5)
Output: 18
Eight layouts use only vertical and square trays. Ten layouts include L-shaped trays.
countLayouts(displayLength = 6)
Output: 37
There are 13 layouts with no L-shaped trays, 20 with two L-shaped trays, and 4 with four L-shaped trays.