We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 772205f commit b1d74a5Copy full SHA for b1d74a5
python/1304_Find_N_Unique_Integers_Sum_up_to_Zero
@@ -0,0 +1,11 @@
1
+class Solution:
2
+ def sumZero(self, n: int) -> List[int]:
3
+ sum = 0
4
+ list = []
5
+
6
+ for i in range(1,n):
7
+ list.append(i)
8
+ sum = sum +i
9
+ list.append(-sum)
10
+ return list
11
0 commit comments