Merge Interval: Given a collection of intervals, merge all overlapping intervals. For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18]. 算法分析:首先要对给定序列排序.然后再去遍历合并. class Interval { int start; int end; Interval() { start = 0; end = 0…