comefrom: <qiyuangong>120_Triangle_1.py
code: def minimumTotal( triangle):
      if triangle is None or len(triangle) == 0:
          return 0
      ls = len(triangle)
      dp = [0] * ls
      dp[0] = triangle[0][0]
      for i in range(1, ls):
          dp[i] = dp[i - 1] + triangle[i][i]
          for j in reversed(range(1, i)):
              dp[j] = min(dp[j - 1] + triangle[i][j], dp[j] + triangle[i][j])
          dp[0] = dp[0] + triangle[i][0]
      return min(dp)
masked: def sample_funcname ( var_0 ) :
      if var_0 is None or len ( var_0 ) == 0 :
          return 0
      var_1 = len ( var_0 )
      var_2 = [ 0 ] * var_1
      var_2 [ 0 ] = var_0 [ 0 ] [ 0 ]
      for var_3 in range ( 1 , var_1 ) :
          var_2 [ var_3 ] = var_2 [ var_3 - 1 ] + var_0 [ var_3 ] [ var_3 ]
          for var_4 in reversed ( range ( 1 , var_3 ) ) :
              var_2 [ var_4 ] = min ( var_2 [ var_4 - 1 ] + var_0 [ var_3 ] [ var_4 ] , var_2 [ var_4 ] + var_0 [ var_3 ] [ var_4 ] )
          var_2 [ 0 ] = var_2 [ 0 ] + var_0 [ var_3 ] [ 0 ]
      return min ( var_2 )
  