Algorithm · Meta · Hard
Four independent coding tasks are described below. Task 1: Block Placement Simulator Start with an empty grid containing n rows and m columns. You are given a sequence of pieces, each labeled A, B, C, D, or E. Each piece is represented by a fixed list of cell offsets (dr, dc) relative to its top-left anchor. The shapes are: A = [(0,0)] B = [(0,0),(0,1)] C = [(0,0),(1,0)] D = [(0,0),(0,1),(1,0),(1,1)] E = [(0,0),(1,0),(1,1)] Pieces cannot be rotated or reflected. A placement…
Checking your access…