<filename>Algorithms/Sign of the Product of an Array/solution.py<gh_stars>0
class Solution:
    def arraySign(self, nums: list[int]) -> int:
        product=1
        for i in nums:
            product*=i

        if product > 0:
            return 1
        elif product == 0:
            return 0
        else:
            return -1
            

# Time Complexity = O(n)
<filename>Algorithms/Sign of the Product of an Array/solution.py<gh_stars>0
class Solution:
    def arraySign(self, nums: list[int]) -> int:
        product=1
        for i in nums:
            product*=i

        if product > 0:
            return 1
        elif product == 0:
            return 0
        else:
            return -1
            

# Time Complexity = O(n)
# Time Complexity = O(n)