English

A Simple and Space Efficient Segment Tree Implementation

Data Structures and Algorithms 2018-07-17 v1

Abstract

The segment tree is an extremely versatile data structure. In this paper, a new heap based implementation of segment trees is proposed. In such an implementation of segment tree, the structural information associated with the tree nodes can be removed completely. Some primary computational geometry problems such as stabbing counting queries, measure of union of intervals, and maximum clique size of Intervals are used to demonstrate the efficiency of the new heap based segment tree implementation. Each interval in a set S={I1,I2,,In}S=\{I_1 ,I_2 ,\cdots,I_n\} of nn intervals can be insert into or delete from the heap based segment tree in O(logn)O(\log n) time. All the primary computational geometry problems can be solved efficiently.

Keywords

Cite

@article{arxiv.1807.05356,
  title  = {A Simple and Space Efficient Segment Tree Implementation},
  author = {Lei Wang and Xiaodong Wang},
  journal= {arXiv preprint arXiv:1807.05356},
  year   = {2018}
}