Help in Segment Tree, Earthquakes

Managed to do it. The actual answer in very easy. Its just a min segment tree, in which we update everything that changes in a range query. Why doesn’t this give TLE? IS this because the way the queries are processed (i.e. building must be built before destroyed).

Is this why the worst case O(nq) never occurs?

@ssrivastava990 @carre @galencolin What are your thoughts?

1 Like