brute force but beginner friendly code (c++) || 62.69 % beats .
Intuition\n\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Tim
# Intuition\n![upvote 1.jpeg](https://assets.leetcode.com/users/images/ff5c7348-6a3c-4428-886c-5682f8b40092_1678369404.0709472.jpeg)\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int arraySign(vector<int>& nums) {\n      \n        int size = nums.size () ;\n        double pro = 1 ;\n       \n        for ( int i = 0 ; i < size ; i ++ ){\n            pro = pro * nums[ i ] ;\n         }\n         if ( pro > 0 ) {\n             return 1 ;\n        }\n        else if ( pro < 0 ){\n            return -1; \n        }\n        else \n        return 0 ;\n       \n    }\n};\n```
['C++']