subvector using const_iterator instead of loop to create subvector
c++\nclass Solution {\npublic:\n    vector<bool> checkArithmeticSubarrays(vector<int>& nums, vector<int>& l, vector<int>& r) {\n        int m = l.size();\n     
```c++\nclass Solution {\npublic:\n    vector<bool> checkArithmeticSubarrays(vector<int>& nums, vector<int>& l, vector<int>& r) {\n        int m = l.size();\n        \n        int k = 0;\n        \n        auto first = nums.begin();\n        \n        vector<bool> ans;\n        \n        while (k < m) {\n            vector<int> temp(first + l[k], first + r[k] + 1);\n            sort(temp.begin(), temp.end());\n            \n            bool unequal = false;\n            \n            int difference = temp[1] - temp[0];\n            \n            for (int i = 1; i < temp.size() - 1; i++) {\n                if (temp[i + 1] - temp[i] != difference) {\n                    ans.push_back(false);\n                    unequal = true;\n                    break;\n                }\n            }\n            \n            if (!unequal) { ans.push_back(true); }\n            k += 1;\n        }\n        \n        return ans;\n    }\n};\n```
['C', 'Sorting', 'C++']