You are given a rows x cols matrix grid representing a field of cherries where grid[i][j] represents the number of cherries you can collect from cell (i, j). Two robots are located at (0, 0) and (0, cols-1). Return the maximum number of cherries collected using both robots by moving towards the bottom.
Java
Cherry Pickup II
You are given a rows x cols matrix grid representing a field of cherries where grid[i][j] represents the number of cherries you can collect from cell (i, j). Two robots are located at (0, 0) and (0, cols-1). Return the maximum number of cherries collected using both robots by moving towards the bottom.