Given an integer n, return any array containing n unique integers such that they add up to 0.

&nbsp;
Example 1:

Input: n = 5
Output: [-7,-1,1,3,4]
Explanation: These arrays also are accepted [-5,-1,1,2,3] , [-3,-1,2,-2,4].


Example 2:

Input: n = 3
Output: [-1,0,1]


Example 3:

Input: n = 1
Output: [0]


&nbsp;
Constraints:


	1 &lt;= n &lt;= 1000


class Solution:
    def sumZero(self, n: int) -> List[int]:
        q,p=divmod(n,2)
        if p:
            return list(range(-q, q+1))
        else:
            return list(range(-q,0))+list(range(1,q+1))
class Solution {
    public int[] sumZero(int n) {
        int[] ans = new int[n];
        int j=0;
        
        for(int i=1;i<=n/2;i++)
        {
            ans[j] = i;
            j++;
        }
        for(int i=1;i<=n/2;i++)
        {
            ans[j] = -i;
            j++;
        }
        if(n%2!=0) ans[j] = 0;
        
        return ans;
    }
}
class Solution {
public:
    vector<int> sumZero(int n) {
        if(n == 1){
            return {0};
        }else{
            vector<int> res;
            for(int i=n/2*-1;i<=n/2;i++){
                if(i == 0){
                    if(n%2 == 0){
                        continue;
                    }else{
                        res.push_back(i);
                        continue;
                    } 
                }
                res.push_back(i);
            }
         return res;   
        }
    }
};
var sumZero = function(n) {
  var num = Math.floor(n/2); 
  var res = [];

  for(var i=1;i<=num;i++){
      res.push(i,-i)
     } 

  if(n%2!==0){
    res.push(0)
  }
  
  return res 
}
Find N Unique Integers Sum up to Zero