The inclusion / exclusion array for final solution
soln = [ None ] * n NEW_LINE min_diff = [ 999999999999 ] NEW_LINE Sum = 0 NEW_LINE for i in range ( n ) : NEW_LINE INDENT Sum += arr [ i ] NEW_LINE curr_elements [ i ] = soln [ i ] = False NEW_LINE DEDENT