Skip to content

Commit e3f467b

Browse files
authored
Update Product of Array Except Self - Leetcode 238.py
1 parent 5b95886 commit e3f467b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Product of Array Except Self - Leetcode 238.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,8 @@ def productExceptSelf(self, nums: List[int]) -> List[int]:
1212
r_arr[j] = r_mult
1313
l_mult *= nums[i]
1414
r_mult *= nums[j]
15-
return [l*r for l, r in zip(l_arr, r_arr)]
15+
16+
return [l*r for l, r in zip(l_arr, r_arr)]
17+
18+
# Time Complexity: O(n)
19+
# Space Complexity: O(n)

0 commit comments

Comments
 (0)