frequency of size k to store the count of each remainder.num in arr:
a. Calculate the remainder rem of num when divided by k.
b. If rem is negative, add k to it to make it positive.
c. Increment the count of rem in the frequency array.false.i = 1 to k/2:
a. Check if frequency[i] is equal to frequency[k-i]. If not, return false.true.