Update Segment tree.