Bezout's Identity Theorem
Intuition\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 
# Intuition\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```cpp []\nclass Solution {\npublic:\n\n    int gcd(int a,int b){\n        if(b==0) return a;\n        else return gcd(b,a%b);\n    }\n\n    bool isGoodArray(vector<int>& arr) {\n        int n=arr.size();\n        int ans=0;\n        for(int i=0;i<n;i++) ans=gcd(ans,arr[i]);\n        return ans==1 ? true : false;\n    }\n};\n```
['C++']