simple easy solution c++
IntuitionApproachComplexity
Time complexity:


Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
- 
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```cpp []
class Solution {
public:
    vector<bool> checkArithmeticSubarrays(vector<int>& nums, vector<int>& l, vector<int>& r) {
        int n=nums.size();
        int m=l.size();
        vector<bool> ans( m , true);
        for (int i=0;i<m;i++){
            int a=l[i];
            int b=r[i];
            if (a==b) {
                ans[i]=true;
            }
            else{
                
                vector<int> temp(nums.begin()+a, nums.begin()+b+1);
            sort(temp.begin(),temp.end());
            int d=temp[1]-temp[0];
            for (int j=1; j<temp.size(); j++){
                if (temp[j]-temp[j-1]!=d){
                    ans[i]=false;
                    break;
                }
            }
            
            
            }

            
        }
        return ans;
        
    }
};
```
['C++']