C++ easy and understandable with O(n*m*logm) time.
\nbool checkAirthmetic(vector<int>& vec){\n        sort(vec.begin(),vec.end());\n        if(vec.size() <= 2) return true;\n        int d = vec[1] - vec[0];\n   
```\nbool checkAirthmetic(vector<int>& vec){\n        sort(vec.begin(),vec.end());\n        if(vec.size() <= 2) return true;\n        int d = vec[1] - vec[0];\n        for(int i=1;i<vec.size();i++){\n            if((vec[i] - vec[i-1]) != d) return false;\n        }\n        return true;\n    }\n    vector<bool> checkArithmeticSubarrays(vector<int>& nums, vector<int>& l, vector<int>& r)     {\n        vector<bool> res;\n        for(int i=0;i<l.size();i++){\n            int a = l[i];\n            int b = r[i];\n            vector<int> temp;\n            for(int i=a;i<=b;i++){\n                temp.push_back(nums[i]);\n            }\n            res.push_back(checkAirthmetic(temp));\n        }\n        return res;\n    }\n```\n\n```\nif(understandable == true) return "An upvote for me";\nelse return "write your query in comment section";
['C']