text: If there exists no element no sum is possible
code: else if ( i = = 0 ) subset [ i % 2 , j ] = false ; else if ( arr [ i - 1 ] <= j ) [ i % 2 , j ] = subset [ ( i + 1 ) % 2 , j - arr [ i - 1 ] ] || subset [ ( i + 1 ) % 2 , j ] ; else [ i % 2 , j ] = subset [ ( i + 1 ) % 2 , j ] ; } } return [ n % 2 , sum ] ; }