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 26d68fc commit a1707adCopy full SHA for a1707ad
product-of-array-except-self/printjin-gmailcom.py
@@ -0,0 +1,10 @@
1
+class Solution:
2
+ def productExceptSelf(self, nums):
3
+ ans = []
4
+ for i in range(len(nums)):
5
+ product = 1
6
+ for j in range(len(nums)):
7
+ if j != i:
8
+ product *= nums[j]
9
+ ans.append(product)
10
+ return ans
0 commit comments