Company: Autodesk Apprentice Software engineer_21april
Difficulty: medium
You have a sheet of n × m grid paper and you'd like to draw a cool design on it. You've decided on a block motif similar to tetris pieces. Specifically, your picture will include the following five types of figures: A : A 1x1 block. B : A 1x3 horizontal block. C : A 2x2 square block. D : A vertical T-shape (3x2). E : A horizontal T-shape (2x3). (Refer to the images for the specific visual orientation of shapes A-E) The array figures contains a list of letters representing the types of figures you'd like to include in your design. Your task is to create a matrix of integers representing the grid paper, and draw the figures on it according to the following rules: Start with a matrix of all 0 s, and use the 1 -based index of each figure to represent it on the grid. For example, if figures[0] = 'E' then the shape added to the grid will look like this: [[0, 1, 0], [1, 1, 1]] Place the figures on the grid in the order they appear in figures . The figures must not overlap any other figures th