Company: Capital One_30june
Difficulty: medium
Draw Figures on Grid Problem Description You have a sheet of n x 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: The shapes are: Figure A: A 1x1 square block, represented as: # Figure B: A 1x3 horizontal rectangular block, represented as: # # # Figure C: A 2x2 square block, represented as: # # # # Figure D: An L-shaped block (3x2), represented as: . # # # # . Figure E: A T-shaped block (2x3), represented as: # # # . # . 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 0s, 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 be marked