✅98% beats solution and easy to understandable solution
\n\n# Code\n\nclass Solution {\n\n    public Boolean check(int arr [])\n    {\n         Arrays.sort(arr);\n        int diff=arr[1]-arr[0];\n       \n        for
\n\n# Code\n```\nclass Solution {\n\n    public Boolean check(int arr [])\n    {\n         Arrays.sort(arr);\n        int diff=arr[1]-arr[0];\n       \n        for( int i=2; i<arr.length; i++)\n        {\n            if(arr[i]-arr[i-1]!=diff)\n            {\n                return false;\n            }\n        }\n        return true;\n    }\n    public List<Boolean> checkArithmeticSubarrays(int[] nums, int[] l, int[] r) {\n        \n        List<Boolean>list=new ArrayList<>();\n        for( int i=0; i<l.length; i++)\n        {\n            int arr[]=new int[r[i]-l[i]+1];\n            for( int j=0; j<arr.length; j++)\n            {\n                arr[j]=nums[l[i]+j];\n            }\n           \n            list.add(check(arr));\n        }\n        return list;\n    }\n}\n```
['Java']