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 f1bad3f commit 171b13fCopy full SHA for 171b13f
my-submissions/e1304 oneliner.py
@@ -0,0 +1,3 @@
1
+class Solution:
2
+ def sumZero(self, n: int) -> List[int]:
3
+ return (([0] if n % 2 else []) + [i for i in range(1, 1 + n // 2)] + [-i for i in range(1, 1 + n // 2)])
0 commit comments