Question: PYTHON: Given Tetris and Rectangle pieces. Input takes width and height for the rectangle and a list a pieces to place. Each piece is a
PYTHON: Given Tetris and Rectangle pieces.
Input takes width and height for the rectangle and a list a pieces to place. Each piece is a list of x and y coordinate offsets . Must identify how to position each piece so that all fit in rectangle. Place pieces in the input list towards the left and bottom so bottom position is (0,0). Then return product of x and y position of the final pieces in the input list . If piece doesnt fit return -1
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
