Last updated 4 years ago
Was this helpful?
这种题基本做法是:把每个点的起点,终点拆开,排个序。然后遇到起点+,遇到终点-。不过得注意起点终点重叠的情况,得看题目要求,例如是否包括,是起点先算还是终点先算。
- Busiest Time in The Mall
other related:
-- interval
--- 要按大楼的点排序,有点相似。要用到heap。