The set {1, 2, … n} is partitioned into two sets A and B, then the minimum value of |sum(A) - sum(B)| is

A

n % 2

B

((n*(n-1))/2) % 2

C

((n*(n+1))/2) % 2

D

0 if n is divisible by 4, 1 otherwise

Boost your performance with adaptive practice tests

Practice every concept in the syllabus

Compare your speed and accuracy with your peers

Download the app and practice on the go