Data structure: segment tree