If the current time instance is even and sum is odd than it takes 2 more steps and few negations in previous elements to reach there .
sum -= n ; if ( sum % 2 != 0 ) { sum -- ; ans . Add ( sign * i ) ; ans . Add ( sign * - 1 * ( i + 1 ) ) ; } ans . Insert ( ( sum / 2 ) - 1 , ans [ ( sum / 2 ) - 1 ] * - 1 ) ; } } return ans ; }