class Solution:
def insert(self, intervals: List[List[int]], newInterval: List[int]) -> List[List[int]]:
bisect.insort(intervals, newInterval)
answer = []
for start, end in intervals:
if answer and answer[-1][1] >= start:
answer[-1][1] = max(answer[-1][1], end)
else:
answer.append([start, end])
return answer