text: Split first N natural numbers into two sets with minimum absolute difference of their sums | C # program to implement the above approach ; Function to split the first N natural numbers into two sets having minimum absolute difference of their sums ; Driver Code
code: using System ; class GFG { static int minAbsDiff ( int N ) { if ( N % 4 == 0 N % 4 == 3 ) { return 0 ; } return 1 ; } public static void Main ( String [ ] args ) { int N = 6 ; Console . WriteLine ( minAbsDiff ( N ) ) ; } }