← Questions

Place Tetris-like shapes in the first spot that fits

0
MetaCodingLast asked Feb 2026

You have an n x m grid and a sequence of shapes from a small fixed set. Place the shapes one at a time, in order; each goes into the first position where it fits, scanning rows from top to bottom and, within a row, from left to right. Return the grid after all placements (or report a shape that does not fit).

Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding