I have a really simple problem and data structure but the number is so large that I need to find an efficient way.
Suppose I have an object that has an attribute which is an interval. For example:
`start stop`
obj1 5 10
obj2 8 12
obj3 11 14
obj4 13 20
obj5 22 25
obj6 24 30
obj7 33 37
obj8 36 40
I want to merge it so that overlapping interval will become one object. So, the result of the example will become
start stop
objA 5 20
objB 22 30
objC 33 40
I am using python for this. Please notice that I have thousand of this type of data.