1. A computer program product, tangibly embodied in a computer readable storage medium, the computer program product to cause a data processing apparatus to: provide a data structure embodied in a computer-readable medium, the data structure implementing a tree of nodes having a plurality of inner nodes and a plurality of leaf nodes, each leaf node including a key having a first value representing a starting point of an interval, a second value representing an ending point of the interval, and a third value representing a duration of the interval, and each inner node being a root node of a subtree, each inner node including a second key having a first value representing a minimum of the starting points of different intervals in the corresponding subtree, a second value representing a maximum of the ending points of the different intervals in the corresponding subtree, and a third value representing a duration of the longest single interval selected from the different intervals in the corresponding subtree.