Skip to content

Commit d29cd55

Browse files
authored
Update Product of Array Except Self - Leetcode 238.py
1 parent 4cc7b25 commit d29cd55

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Product of Array Except Self - Leetcode 238/Product of Array Except Self - Leetcode 238.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ def productExceptSelf(self, nums: List[int]) -> List[int]:
77
for i in range(n):
88
multiplier = 1
99
for j in range(n):
10-
if i == j:
11-
continue
12-
else:
10+
if i != j:
1311
multiplier *= nums[j]
1412
ans[i] = multiplier
1513

0 commit comments

Comments
 (0)