100% || Easy & perfect
Happy Coding !!\njava []\nclass Solution {\n    public int[][] insert(int[][] intervals, int[] newInterval) {\n        List<int[]> ans = new ArrayList<>();\n   
Happy Coding !!\n```java []\nclass Solution {\n    public int[][] insert(int[][] intervals, int[] newInterval) {\n        List<int[]> ans = new ArrayList<>();\n        int start = newInterval[0], end = newInterval[1];\n        boolean inserted = false;\n        \n        for (int[] inv : intervals) {\n            int cstart = inv[0], cend = inv[1];\n            \n            if (cend < start || inserted) {\n                ans.add(new int[]{cstart, cend});\n                continue;\n            }\n            \n            start = Math.min(start, cstart);\n            if (end < cstart) {\n                ans.add(new int[]{start, end});\n                ans.add(new int[]{cstart, cend});\n                inserted = true;\n                continue;\n            }\n            \n            if (end <= cend) {\n                ans.add(new int[]{start, cend});\n                inserted = true;\n            }\n        }\n        \n        if (!inserted) {\n            ans.add(new int[]{start, end});\n        }\n        \n        return ans.toArray(new int[ans.size()][]);\n    }\n}\n```\n```python []\nprint(\'Hello world!\')\n```\n```ruby []\nputs \'Hello world!\'\n```\n
['Java']