Array Challenge

Company: Hugo_2ndaug

Difficulty: medium

Problem Statement

Array Challenge Problem A Tetris board is 12 columns wide. Column i currently holds a stack of fill[i] blocks resting on the floor, so the cells of that column at heights 0, 1, ..., fill[i] - 1 are occupied and everything above is empty. One more piece is about to fall. You are told which piece it is, by its capital letter: I J L O S T Z #### # # ## ## ### ## ### ### ## ## # ## Before the drop you may rotate the piece by any multiple of 90 degrees and slide it sideways as far as you like. Then it falls straight down and stops as soon as any of its cells would land on a block or on the floor. No sliding or spinning during the fall. A row of the board is complete when all 12 of its cells are occupied. Report the greatest number of rows the drop can complete. Complete the function ArrayChallenge , which receives the piece letter and the twelve fill levels and returns the answer as a string. Input Format The first line contains the piece letter, one of I , J , L , O , S , T , Z . The secon