Question : If somehow I partition a number array into two sets and their difference in sum is $1$ . Can confirm that the minimum possible difference in sums that can be attained by partitioning the array optimally into two sets is actually $1$?
(say that any element in the array is less than or equal to the max_element of array and greater than $zero$)
example : $3,8,6,4,1,5,7,9$ can be partitioned into $3,8,6,4$ and $1,5,7,9$ with sum difference 1.
(sorry if my example itself is wrong,but I hope my question is clear)
I'm working on a code which divides the array into two sets with minimum sum difference and I want to stop the execution if I get a min difference as $1$ at some point of time.