Fundamentals/Unique Integers That Sum Up To 0
← PrevNext →
Given an integer n, return any array containing n unique integers such that they add up to 0.
Example 1
Input5
Output[-4,-2,0,2,4]
Example 2:
Input3
Output[-2, 0, 2]
Example 3:
Input1
Output[0]