✅ Java best approach :-)
\nclass Solution {\n    public boolean isGoodArray(int[] nums) {\n    int gcd=nums[0];\n        for(int i=1; i<nums.length; i++){\n            gcd=gcd(gcd, nums
```\nclass Solution {\n    public boolean isGoodArray(int[] nums) {\n    int gcd=nums[0];\n        for(int i=1; i<nums.length; i++){\n            gcd=gcd(gcd, nums[i]);\n            if(gcd==1)return true;\n        }\n        return gcd==1;\n}\n        public int gcd(int a, int b) {\n   if (b==0) return a;\n   return gcd(b,a%b);\n    }\n}\n\n```\n
['Java']