mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08:00
Merge pull request #158 from Sayan97/patch-3
Update minimum_partition.py
This commit is contained in:
commit
f0addfb2f3
@ -20,7 +20,7 @@ def findMin(arr):
|
||||
if (arr[i-1] <= j):
|
||||
dp[i][j] = dp[i][j] or dp[i-1][j-arr[i-1]]
|
||||
|
||||
for j in range(s/2, -1, -1):
|
||||
for j in range(int(s/2), -1, -1):
|
||||
if dp[n][j] == True:
|
||||
diff = s-2*j
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user