Bezout's algorithm C++
\nclass Solution {\npublic:\n    //bezout\'s algorithm\n    bool isGoodArray(vector<int>& nums) {\n        if(nums.size()==1 && nums[0]==1){\n            return
```\nclass Solution {\npublic:\n    //bezout\'s algorithm\n    bool isGoodArray(vector<int>& nums) {\n        if(nums.size()==1 && nums[0]==1){\n            return true;\n        }\n        int num = nums[0];\n        for(int i=1;i<nums.size();i++){\n            num = __gcd(num,nums[i]);\n            if(num==1){\n                return true;\n            }\n        }\n        return false;\n    }\n};\n```
[]