线段树的发明者:Bentley,我会好好记住他的 = =。

The primary task performed by a segment tree is the same as that done by
an interval tree: keeping track of a set of n intervals, here assumed to be halfopen,
and listing for a given query key all the intervals that contain that key in
output-sensitive time O(log n+ k), if the output consisted of k intervals. It is
slightly worse at this task than the interval tree, having a space requirement of
O(n log n) instead of O(n). But the segment tree, or the idea of the canonical
interval decomposition on which it is based, is really a framework on which
a number of more general tasks can be performed. Again it is a static data
structure. Segment trees were invented by Bentley.

你可能感兴趣的:(tree,query,idea,output,Intervals)