Back to problems

Tetris Block Drop

Algorithm · Databricks · Medium

Tetris Piece Descent Problem Overview Model one vertical Tetris drop. A piece begins at the top of a grid that may already have occupied cells, then descends without moving sideways. It must halt immediately before it would leave the board or collide with an occupied cell. You receive these three arguments: board: a two-dimensional grid describing the current playfield. A value of 1 at board[r][c] denotes an obstacle, while 0 denotes an unoccupied location. block: a…

Checking your access…