1304. Find N Unique Integers Sum up to Zero¶ Time: Space: C++JavaPython 1 2 3 4 5 6 7 8 9 10 11class Solution { public: vector<int> sumZero(int n) { vector<int> ans(n); for (int i = 0; i < n; ++i) ans[i] = i * 2 - n + 1; return ans; } }; 1 2 3 4 5 6 7 8 9 10class Solution { public int[] sumZero(int n) { int[] ans = new int[n]; for (int i = 0; i < n; ++i) ans[i] = i * 2 - n + 1; return ans; } } 1 2 3class Solution: def sumZero(self, n: int) -> list[int]: return list(range(1 - n, n, 2))