Company: Goldman sachs_19aug
Difficulty: medium
RoboMax Path Problem Description RoboMax is a patrol robot in a high-tech warehouse. The warehouse is a grid with R rows and C columns of square zones, and every zone has a reward value: the amount of valuable data RoboMax collects when it passes through that zone. RoboMax starts its patrol in the top-left zone (row 0 , column 0 ) and must finish in the bottom-right zone (row R-1 , column C-1 ). From a zone it can move only to an adjacent zone that shares an edge with it: up, down, left or right. Its battery is limited, so it may visit each zone at most once . It does not have to visit every zone. A patrol is written as its move string , one letter per move: U for moving up (to the previous row) D for moving down (to the next row) L for moving left (to the previous column) R for moving right (to the next column) The total reward of a patrol is the sum of the reward values of all the zones it visits, including the starting zone and the final zone. RoboMax wants the largest possible tota