Adding constructor for the Segment Tree