BEATS 99% IN TIME IN PYTHON
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution:\n    def func(self,nl):\n        nl.sort()\n        for i in range(1,len(nl)-1):\n            if(abs(nl[i+1]-nl[i])!=abs(nl[1]-nl[0])):\n                return False\n        return True\n    def checkArithmeticSubarrays(self, nums: List[int], l: List[int], r: List[int]) -> List[bool]:\n        ans=[]\n        for i in range(len(l)):\n            nl=nums[l[i]:r[i]+1]\n            ans.append(self.func(nl))\n        return ans\n            \n```
['Python3']