Company: Nasdaq_18oct
Difficulty: medium
Wooden Block Puzzle Problem Description You make wooden toys in your woodworking shop for the enjoyment of your grandchildren. You have planned a series of small puzzles, and you would like to automate the writing of the solutions. Each puzzle is a grid, on which are placed wooden blocks of various shapes. These blocks must be taken out of the game, one after the other, without colliding. You have to determine the order in which they are taken out. Each block is numbered with a value between 0 and 9. When you enter the number of a block, it will be moved to the right until it is off of the grid. If several blocks can be exited at the same time, you can choose which one you would like to remove first. Implement the function solve(width, height, nb_blocks, grid) . This function is executed at each round of the game and should return the number of the next block to move. Input Data of the Function width : width of the puzzle, in number of cells. height : height of the puzzle, in number of