← Questions

Place fixed shapes on a grid in order

0
UberCodingLast asked Sep 2025

You get an n x m grid and a list of shapes, like Tetris pieces that neither rotate nor fall. Place them in order: each goes at the first position, scanning from the top-left, where it fits without overlapping earlier pieces, and its cells are marked with its number in the list.

Return the filled grid, with empty cells shown as ..

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