I was working on this problem and wondered how it would look in Swift.
Given an array of non-overlapping and sorted intervals, insert a new interval into the array and merge with existing intervals if necessary.
For example, given intervals:
[(1,3), (6,9)]
>