🔥🔥JAVA SOLUTION 🔥🔥|| 🔥🔥SIMPLE AND EASY🔥🔥
\n# Approach\nGretest Comman Divisor\n\n# Complexity\n- Time complexity:\nO(n)\n\n- Space complexity:\nO(1)\n\n# Code\n\nclass Solution {\n    public boolean is
\n# Approach\nGretest Comman Divisor\n\n# Complexity\n- Time complexity:\nO(n)\n\n- Space complexity:\nO(1)\n\n# Code\n```\nclass Solution {\n    public boolean isGoodArray(int[] nums) {\n        int tempGCD = nums[0];\n        int i=0;\n        while(i<nums.length){\n            tempGCD=gcd(tempGCD , nums[i]);\n            i++;\n            if(tempGCD ==1 )return true;\n        }\n        return false;\n    }\n\n    int gcd(int a , int b){\n        if(b==0)return a;\n        else return gcd(b , (a%b));\n    }\n}\n```
['Java']