Skip to content

Commit 1157cd2

Browse files
Removed extra Python folder that was created from a mistyped folder name in a PR. Folder was named "python " with an extra space, which created an new folder with only that file in it. Merged that file into the main python folder as well as a file that had been submitted under python/python.
1 parent da1272c commit 1157cd2

3 files changed

+7
-21
lines changed

Diff for: python/1822-sign-of-the-product-of-an-array.py

+7-11
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
from typing import List
2-
3-
41
class Solution:
52
def arraySign(self, nums: List[int]) -> int:
6-
sign = 1
7-
8-
for num in nums:
9-
if num == 0:
3+
flag = True
4+
for i in nums:
5+
if i == 0:
106
return 0
11-
if num < 0:
12-
sign = -1 * sign
13-
14-
return sign
7+
if i < 0:
8+
flag = not flag
9+
10+
return 1 if flag else -1

Diff for: python/python/1822-sign-of-the-product-of-an-array.py

-10
This file was deleted.

0 commit comments

Comments
 (0)