Java Solution [ Arithmetic Subarrays ]
\nclass Solution {\n    public List<Boolean> checkArithmeticSubarrays(int[] nums, int[] l, int[] r) {\n        List<Boolean> result = new ArrayList<>();\n      
```\nclass Solution {\n    public List<Boolean> checkArithmeticSubarrays(int[] nums, int[] l, int[] r) {\n        List<Boolean> result = new ArrayList<>();\n        int L = nums.length, ll = l.length,ind=0;\n        for(int i=0;i<ll;i++){\n            int[] arr = new int[r[i]-l[i]+1];\n            ind=0;\n            for(int k=l[i];k<=r[i];k++){\n                arr[ind] =nums[k];\n                ind++;\n            }\n            Arrays.sort(arr);\n            result.add(isArithmetic(arr));\n        }\n        return result;\n    }\n    \n    public boolean isArithmetic(int[] nums) {\n        int L = nums.length;\n        boolean b = true;\n        if(L<=2) return true;\n        for(int i=1;i<L-1;i++){\n            if(nums[i]-nums[i-1]!=nums[i+1]-nums[i]) return false;\n        }\n        return b;\n    }\n}\n```\n\nHappy Coding!!!\nDo upvote if you like the Solution.\nAny queries or suggestions? Sure!! Ping me :\n* [[LinkedIn](https://www.linkedin.com/in/rohitm17/)]  \n* [[Twitter](https://twitter.com/rohit_mittal17)]\n* [[GitHub](https://github.com/rohitm17)]\n* [[Medium](https://medium.com/@rohitm17)]
['Java']