Skip to content

Commit 96d43c7

Browse files
authored
Update find-array-given-subset-sums.py
1 parent 0741830 commit 96d43c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/find-array-given-subset-sums.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# => [-d]+[(-x1), ..., (-xi)]+[x(i+1), ..., x(n-1)] is also a solution
1717
#
1818
# [conclusion]
19-
# - if new_sums with +d/-d both contain zero, we can choose either one
19+
# - if new_sums with +d/-d (including d = 0) both contain zero, we can choose either one
2020
# - if only one of new_sums with +d/-d contains zero, we can only choose the one with zero since subset_sums must contain zero
2121

2222
# optimized from solution4 (not using dict), runtime: 1040 ms

0 commit comments

Comments
 (0)