Added the first version of the Segment tree implementation.