Algorithm · Dropbox · Medium
Problem A grid has a start cell at (0, 0) and a destination at (n-1, m-1). Four walking methods—A, B, C, and D—are available, and each method has a time and a cost associated with every cell. Determine the shortest-time path from the start to the destination when the entire path must use one method. When several paths require the same amount of time, select the one whose total cost is smallest. Function Signature Input n and m, the dimensions of the grid. costsA, costsB,…
Checking your access…