Divide numbers from 1 to n into two groups with minimum sum difference from O(2^N) to O(N)

For numbers from 1 to given n, we have to find the division of the elements into two groups having minimum absolute sum difference. We will explore two techniques:

Read at: iq.opengenus.org/divide-numbers-from-1-to-n-into-two-groups-with-minimum-difference
This is a companion discussion topic for the original entry at http://iq.opengenus.org/divide-numbers-from-1-to-n-into-two-groups-with-minimum-difference/