<gh_stars>0
'''
URL: https://leetcode.com/problems/sign-of-the-product-of-an-array/

Difficulty: Easy

Title: Sign of the Product of an Array
'''

################### Code ###################

class Solution:

    def arraySign(self, nums: List[int]) -> int:

        negCount = 0

        

        for n in nums:

            if n == 0:

                return 0

            

            if n < 0:

                negCount += 1

                

        if negCount%2 == 0:

            return 1

        else:

            return -1

'''
URL: https://leetcode.com/problems/sign-of-the-product-of-an-array/

Difficulty: Easy

Title: Sign of the Product of an Array
'''

################### Code ###################

class Solution:

    def arraySign(self, nums: List[int]) -> int:

        negCount = 0

        

        for n in nums:

            if n == 0:

                return 0

            

            if n < 0:

                negCount += 1

                

        if negCount%2 == 0:

            return 1

        else:

            return -1
URL: https://leetcode.com/problems/sign-of-the-product-of-an-array/
 
 Difficulty: Easy
 
 Title: Sign of the Product of an Array ################### Code ###################