I am trying to find a space and time efficient way to calculate the number of ways to partition a set of integers {1, 2, …, N} into two partitions such sums of integers in the two partitions is equal. I have started with a brute force approach that seems to give me correct results.Read more