C# simple solution
\npublic class Solution {\n    public int[][] Insert(int[][] intervals, int[] newInterval) {\n        var res = new List<int[]>();\n        \n        foreach (v
```\npublic class Solution {\n    public int[][] Insert(int[][] intervals, int[] newInterval) {\n        var res = new List<int[]>();\n        \n        foreach (var interval in intervals)\n        {\n            if (interval[0] > newInterval[1])\n            {\n                res.Add(newInterval);\n                newInterval = interval;\n            }\n            else if (interval[1] < newInterval[0])\n            {\n                res.Add(interval);\n            }\n            else\n            {\n                newInterval[0] = Math.Min(newInterval[0], interval[0]);\n                newInterval[1] = Math.Max(newInterval[1], interval[1]);\n            }\n        }\n        \n        res.Add(newInterval);\n        \n        return res.ToArray();\n    }\n}\n```
['C#']