easy sol^n  || beats 98% ||  Linear Diophantine Equation
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \nIterate over the whole 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nIterate over the whole array and calculate gcd\nIf gcd is 1 then return true, otherwise false\n# Complexity\n- Time complexity:0(n\u2217log(c))\n- where c= min(a,b)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:0(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n int  kcd1(int a,int b){\n        if(b==0)   return a;\n        return kcd1(b,a%b);\n      }\n    bool isGoodArray(vector<int>& nums) {\n         ios_base::sync_with_stdio(0);\n        cin.tie(0);\n        cout.tie(0);\n        int k=0;\n     \n        for(auto it:nums){\n        k=    kcd1(k,it);\n           \n        }\n        return k==1;\n    }\n};\n```
['Array', 'Math', 'Number Theory', 'C++']