Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b1d74a5

Browse files
authored
Add 1304_Find_N_Unique_Integers_Sum_up_to_Zero (qiyuangong#16)
* Add 1304_Find_N_Unique_Integers_Sum_up_to_Zero Python Solution, by @Mansi2814
1 parent 772205f commit b1d74a5

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)