Easy Solution
Complexity\n- Time complexity:O(n)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity:O(n)\n Add your space complexity here, e.g. O(n) \n\n# Code
# Complexity\n- Time complexity:O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:O(n)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    vector<vector<int>> insert(vector<vector<int>>& intervals, vector<int>& newInterval) {\n        int start = newInterval[0], end = newInterval[1];\n        vector<vector<int>> left, right;\n\n        for(auto i:intervals){\n            if(i[1]<start){\n                left.push_back(i);\n            }\n            else if(i[0]>end){\n                right.push_back(i);\n            }\n            else{\n                start = min(start, i[0]);\n                end = max(end, i[1]);\n            }\n        }\n\n        vector<vector<int>> res;\n        res.insert(res.end(), left.begin(), left.end());\n        res.push_back({start, end});\n        res.insert(res.end(), right.begin(), right.end());\n        return res;\n    }\n};\n```
['C++']