Segment Tree Applications