text: Split first N natural numbers into two sets with minimum absolute difference of their sums | Function to split the first N natural numbers into two sets having minimum absolute difference of their sums ; Driver Code
code: function minAbsDiff ( N ) { if ( N % 4 == 0 N % 4 == 3 ) { return 0 ; } return 1 ; } var N = 6 ; document . write ( minAbsDiff ( N ) ) ;