Given the array below,What is your AC answer?


  • 1
    B

    the input array is below:

    input[][]={{0,-74,-47,-20,-23,-39,-48},{37,-30,37,-65,-82,28,-27},{-76,-33,7,42,3,49,-93},{37,-41,35,-16,-96,-56,38},{-52,19,-37,14,-65,-42,9},{5,-26,-30,-65,11,5,16},{-60,9,36,-36,41,-47,-86},{-22,19,-5,-41,-8,-96,-95}};
    

    and the table is like below:

         0  -74  -47  -20  -23  -39  -48
       37  -30   37  -65  -82   28  -27
      -76  -33    7   42    3   49  -93
       37  -41   35  -16  -96  -56   38
      -52   19  -37   14  -65  -42    9
        5  -26  -30  -65   11    5   16
      -60    9   36  -36   41  -47  -86
      -22   19   -5  -41   -8  -96  -95
    

    The AC answer is 30, but I do not know how to get the answer, which way can we go through? Thanks!


  • 0
    H

    One possible path:

    (0)down->(37) right ->(-30) right->(37)down->(7)right->(42)right->(3)right->(49)down->(-56)right->(38)down->(9)down->(16)down->(-86)down->(-95)


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.