Segment tree complexity analysis

 

 

 

 

You see this is because we want to access some interval is continuous, so he points within the layer, then it should also be continuous,

Then this far left or far right, then there may be the point of that range that covers only half, but in the middle of all that is certainly completely covered out.

 So, if you are inside this layer exceeds five points, then it certainly is among at least three points, so certainly there will be two adjacent points is that they come from the same father node,

And they are both full coverage, so, in fact, is their father node is completely covered, then in their father's time for it, in fact, would not recursive down,

So those two points is unlikely to be accessed, and so on just about every level, that is to say, it has not been completely overwritten only two points.

Because completely covers the point he would not recursive, so there is no point in being completely only be on those two endpoints, then the two will recursion, so only a maximum of four nodes,

Then to the next level is the same, it is only a maximum of two nodes he is not completely covered, so each layer only two such nodes, then the next level of recursion his words,

Only a maximum of four points is not being accessed.

(Tzj)

Guess you like

Origin www.cnblogs.com/aprincess/p/11627177.html