Collect maximum cherries with two paths from top-left to bottom-right on a grid with obstacles.
Constraints
Example
>>> cherry_pickup([[0,1,-1],[1,0,-1],[1,1,1]]) 5 >>> cherry_pickup([[1]]) 1 >>> cherry_pickup([[0,0],[0,0]]) 0 >>> cherry_pickup([[0,1,0],[1,1,1],[0,1,0]]) 6
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints