Create Segment tree