💕C++,JAVA,python || 💕Runtime 0 ms Beats 100%|| Daily LeetCode solution
Please UpVote..\uD83D\uDE0A\uD83D\uDC95\n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time complexity:O(n)\n Add your time 
# Please UpVote..\uD83D\uDE0A\uD83D\uDC95\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:O(1)\n```C++ []\nclass Solution {\npublic:\n    int arraySign(vector<int>& nums) {\n        int neg=0;\n        for(auto x:nums)\n        {\n            if(x==0)\n            {\n                return 0;\n            }\n            else if(x<0)\n            {\n                neg++;\n            }\n        }\n        if(neg%2==0)\n        {\n            return 1;\n        }\n        return -1;\n    }\n};\n```\n```python []\nclass Solution(object):\n    def arraySign(self, nums):\n        neg = 0\n        for x in nums:\n            if x == 0:\n                return 0\n            elif x < 0:\n                neg += 1\n        if neg % 2 == 0:\n            return 1\n        return -1\n```\n```JAVA []\nclass Solution {\n    public int arraySign(int[] nums) {\n        int neg = 0;\n        for (int x : nums) {\n            if (x == 0) {\n                return 0;\n            } else if (x < 0) {\n                neg++;\n            }\n        }\n        if (neg % 2 == 0) {\n            return 1;\n        }\n        return -1;\n    }\n}\n\n```\n# Please UpVote..\uD83D\uDE0A\uD83D\uDC95\n\n
['Python', 'C++', 'Java']