C++ | Easy Solution
\nclass Solution {\npublic:\n    bool solve(vector<int>& nums, int l, int r){\n        vector<int> temp(nums.begin()+l, nums.begin()+r+1);\n        sort(temp.be
```\nclass Solution {\npublic:\n    bool solve(vector<int>& nums, int l, int r){\n        vector<int> temp(nums.begin()+l, nums.begin()+r+1);\n        sort(temp.begin(), temp.end());\n        int diff = temp[1] - temp[0];\n        for(int i=2;i<temp.size();++i){\n            if((temp[i] - temp[i-1]) != diff)\n                 return false;         \n        }\n        return true;\n    }\n    \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            res.push_back(solve(nums, l[i], r[i]));\n        }\n        return res;\n    }\n};\n```
['C', 'Sorting']