text: Closest sum partition ( into two subsets ) of numbers from 1 to n | C # implementation of the above approach ; Function to return the minimum required absolute difference ; Driver code
code: using System ; class GFG { static int minAbsDiff ( int n ) { int mod = n % 4 ; if ( mod == 0 mod == 3 ) { return 0 ; } return 1 ; } static public void Main ( ) { int n = 5 ; Console . WriteLine ( minAbsDiff ( n ) ) ; } }