Skip to content

Commit 0741830

Browse files
authored
Update find-array-given-subset-sums.cpp
1 parent d00a605 commit 0741830

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/find-array-given-subset-sums.cpp

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 unordered_map), runtime: 188 ms

0 commit comments

Comments
 (0)