Zoom Communications Interview Question

Solve a Tetris like leetcode problem dealing with matrix