Skip to content

Commit 4318332

Browse files
committed
Fixed bottom-up DP solution
1 parent abca38b commit 4318332

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

minimum_path_sum/solution.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ class Solution:
44
def minPathSum(self, grid):
55
n = len(grid)
66
m = len(grid[0])
7-
t = [[1] * m] * n
8-
i = j = 0
7+
t = [[0 for i in range(m)] for j in range(n)]
98
for i in range(n):
109
for j in range(m):
1110
if i == 0 and j == 0:

0 commit comments

Comments
 (0)