Number of Paths with Max Score
You are given a square board of characters. You can move on the
board starting at the bottom right square marked with the character 'S'.
You need to reach the top left square marked with the character 'E'. The
rest of the squares are labeled either with a numeric character 1, 2, ...,
9 or with an obstacle 'X'. In one move you can go up, left or up-left
(diagonally) only if there is no obstacle there.
Return a list of two integers: the first integer is the maximum sum of
numeric characters you can collect, and the second is the number of
such paths that you can take to get that maximum sum, taken
modulo 10^9 + 7.
In case there is no path, return [0,0].
Input:
first line contains n length of array
next line n lines contain input
as string
Answers
Answered by
0
Answer:
I am unable to understand your question
please follow me
Similar questions