My 18ms C++ code, with explanation
    class Solution {\n    public:\n      std::vector<Interval> insert(std::vector<Interval> &intervals, Interval newInterval) {\n    \n        auto partial_orde
        class Solution {\n    public:\n      std::vector<Interval> insert(std::vector<Interval> &intervals, Interval newInterval) {\n    \n        auto partial_order =[](const Interval & a, const Interval & b){\n          return a.end < b.start;\n        };\n    \n        auto less = std::lower_bound(intervals.begin(), intervals.end(), newInterval, partial_order);\n    \n        auto greater = std::upper_bound(intervals.begin(), intervals.end(), newInterval, partial_order);\n        //printf("The index position: %d %d\\n", less - intervals.begin(), greater - intervals.begin());\n        std::vector<Interval> answer; \n    \n        answer.insert(answer.end(), intervals.begin(), less);\n        answer.push_back(mergeEqual(less, greater, newInterval));\n        answer.insert(answer.end(), greater, intervals.end());\n        return answer;\n      }\n    \n    private:\n    \n      // Merge the new interval with an array of intervals, all intervals in the \n      // array equal with the new interval in terms of the partial order we \n      // defined.\n      // In other words all of them are overlapped with the new interval.\n    \n      Interval mergeEqual(const std::vector<Interval>::iterator & first, const std::vector<Interval>::iterator & last, const Interval &target){\n    \n        Interval answer(target);\n        if(first < last){\n          answer = merge(answer, *first);\n          answer = merge(answer, *(last-1));\n        }\n        return answer;\n      }\n      // Merge two overlapped intervals.\n      Interval merge(const Interval & a, const Interval & b) {\n        return Interval(std::min(a.start, b.start), std::max(a.end, b.end));\n      }\n    };
['C++']