segment tree and skiplist