Skip to content

Commit 5ce6237

Browse files
authored
Update find-array-given-subset-sums.cpp
1 parent 708a2dc commit 5ce6237

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
@@ -2,7 +2,7 @@
22
// Space: O(1)
33

44
// [proof]
5-
// - let d = sorted_sums[0]-sorted_sums[1] and d != -d, where one of +d/-d is the smallest positive or largest negative number of the original solution of [S1, ..., S(2^n)]
5+
// - let d = sorted_sums[0]-sorted_sums[1] and d != -d (d = 0 is trival), where one of +d/-d is the smallest positive or largest negative number of the original solution of [S1, ..., S(2^n)]
66
// - given Sp-d = 0 for some p in [1, 2^n] and Sq-(-d) = 0 for some q in [1, 2^n]
77
// assume d is a number of the original solution of [S1, ..., S(2^n)] (the proof where -d is a number of the original solution is vice versa)
88
// let Sq = x1+...+xi where 1 <= i <= n-1

0 commit comments

Comments
 (0)