注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号
x
1. coding:
Merge intervals [[0,2], [1,4], [5,9]] --> [[0,4], [5,9]].
Idea: sort the list by the start time, and compare with res[-1], if overlapp just unever a item comes, go to the tag to find most similar, instead of going though all items.
|