C++ solution | simple and easy
class Solution {\npublic:\n\n    // if we choose any two elements from the array:\n\t// if the gcd is 1 then the required condition is true and\n\t// if gcd is 
class Solution {\npublic:\n\n    // if we choose any two elements from the array:\n\t// if the gcd is 1 then the required condition is true and\n\t// if gcd is not equal to 1 then the condition will never satisfy\n\t// its an observation, so don\'t get confused ( like an AXIOM )\n\t// you can dry run the given test cases to confirm\n\t\n    int gcd(int a, int b){\n        while (a%b != 0){\n            int rem=a%b;\n            a=b;\n            b=rem;\n        }\n        return b;\n    }\n    bool isGoodArray(vector<int>& nums) {\n        int n = nums.size();\n        int a = 0;\n        for(int i=0; i<n; i++){\n            a = gcd(a,nums[i]);\n            if(a==1)\n                return true;\n        }\n        return false;\n    }\n};
['C', 'C++']