Check if GCD is 1
\nclass Solution {\npublic:\n    bool isGoodArray(vector<int>& nums) {\n        int gcd = nums[0];\n        if(gcd == 1)\n            return true;\n        for(
```\nclass Solution {\npublic:\n    bool isGoodArray(vector<int>& nums) {\n        int gcd = nums[0];\n        if(gcd == 1)\n            return true;\n        for(int i = 1; i < nums.size(); i++) {\n            gcd = __gcd(gcd, nums[i]);\n            if(gcd == 1)\n                return true;\n        }\n        return false;\n    }\n};\n```
[]