Question: Problem B ( answer in python , c # , or javascript ) Bob Roberts is the self proclaimed Car Vet who owns several junk

Problem B( answer in python , c # , or javascript)
Bob Roberts is the self proclaimed "Car Vet" who owns several junk car lots where people can come and search for spare parts for their (ailing) cars. The cars in each lot are parked in a fenced-in mn grid lot, where each car takes up two grid squares. Each lot also has zero or more grid locations devoted to piles of parts (fenders,8-track tape players, wheel covers, fuzzy dice, etc.); these locations are effectively blocked. Business has been so good that each of Bob's lots has only one empty grid space left.
From time to time, Bob or one of his lot attendants drops a part on the ground and it rolls underneath one of the cars. The only way to retrieve it is to move the car out of the way. Depending on the location of the empty grid space, it may be necessary to move several cars in order to achieve this. Cars can only move forward or backward, and car movement is also constrained by the fence, which prevents any car from moving off the lot, and by the blocked grid locations containing piles of parts.
Figure 1 shows an example. An ambihelical hexnut has rolled under car number 3 in row 3, column 3 of the grid (shaded dark gray). The space in row 1, column 3 is empty and the space in row 3, column 4 is blocked. The only way to retrieve the part is to move car 8, then car 4, then car 3. Note that if the locations of the empty grid cell and the blocked grid cell were reversed, it would not be possible to retrieve the part.
Input
Input starts with a line containing two positive integers
 Problem B( answer in python , c # , or javascript)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!