Finding (number of) overlaps in a list of time ranges

后端 未结 9 636
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-04 19:53

Given a list of time ranges, I need to find the maximum number of overlaps.

Following is a dataset showing a 10 minute interval of calls, from which I am trying to f

9条回答
  •  粉色の甜心
    2020-12-04 20:13

    You short the list on CallStart. Then for each element (i) you see for all j < i if

    CallEnd[j] > CallStart[i] // put it in a map with CallStart[i]  as the key and some count
    

    Rest should be easy enough.

提交回复
热议问题