Lintcode:合并区间

问题: 给出若干闭合区间,合并全部重叠的部分。python 样例: 样例1:app 输入: [(1,3)] 输出: [(1,3)] 样例 2:this 输入: [(1,3),(2,6),(8,10),(15,18)] 输出: [(1,6),(8,10),(15,18)] python:code """ Definition of Interval. class Interval(object):
相关文章
相关标签/搜索