Python | without sort | 164ms | 100% faster
\nclass Solution:\n    def checkArithmeticSubarrays(self, nums: List[int], l: List[int], r: List[int]) -> List[bool]:\n        out=[]\n        for i, j in zip(l
```\nclass Solution:\n    def checkArithmeticSubarrays(self, nums: List[int], l: List[int], r: List[int]) -> List[bool]:\n        out=[]\n        for i, j in zip(l, r):\n            out.append(self.canMakeArithmeticProgression(nums[i:j+1]))\n        return out\n        \n    def canMakeArithmeticProgression(self, arr: List[int]) -> bool:\n        minArr = min(arr)\n        maxArr = max(arr)\n\t\t\n\t\t# if difference between minArr and maxArr cannot be divided into equal differences, then return false\n        if (maxArr-minArr)%(len(arr)-1)!=0:\n            return False\n\t\t\t\n\t\t# consecutive difference in arithmetic progression\n        diff = int((maxArr-minArr)/(len(arr)-1))\n        if diff == 0:\n            if arr != [arr[0]]*len(arr):\n                return False\n            return True\n\t\t\n\t\t# array to check all numbers in A.P. are present in input array.\n\t\t# A.P.[minArr, minArr+d, minArr+2d, . . . . . . . maxArr]\n        check = [1]*len(arr)\n        for num in arr:\n            if (num-minArr)%diff != 0:\n                return False\n            check[(num-minArr)//diff]=0\n\t\t\n\t\t# if 1 is still in check array it means at least one number from A.P. is missing from input array.\n        if 1 in check:\n            return False\n        return True\n```
['Python', 'Python3']