Clean and easiest solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\nWe will iterate till we get gcd 1\n\n# Complexity\n- Time complexity:\n A
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\nWe will iterate till we get gcd 1\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    bool isGoodArray(vector<int>& nums) {\n        int n = nums.size();\n        int GCD = nums[0];\n\n        for (int i = 1; i < n; i++) {\n            GCD = __gcd(GCD, nums[i]);\n\n            if (GCD == 1) {\n                return true;\n            }\n        }\n        return GCD == 1;\n    }\n};\n```
['Number Theory', 'C++']