2 Liner Cool & Clean Code  ||  Fast & Efficient  ||  C++
\n\n/*  \nWe don\'t need to multiple all elements and then check the product, it will give RTE\n\nTo avoid this, we just need to check for each element is it +v
```\n\n/*  \nWe don\'t need to multiple all elements and then check the product, it will give RTE\n\nTo avoid this, we just need to check for each element is it +ve, -ve or 0.\nAnd depending on this we just need to update our sign variable,\n\nif the element is < 0 : multiple sign by -1,\nif element == 0 :  multiply sign by 0\nelse the only condition that left is, if element is > 0 : multiply sign by 1( can skip this condition)\n\nAt the end just return the sign\n*/\n\nclass Solution {\npublic:\n    int arraySign(vector<int>& nums) {\n        int sign = 1;\n        for(int x : nums) sign *= (x == 0) ? 0 : ((x < 1) ? -1 : 1);\n        return (sign < 0) ? -1 : ((sign > 0) ? 1 : 0);\n    }\n};\n```
['C']