A simple and space efficient segment tree implementation

The segment tree is an extremely versatile data structure. In this paper, a new array 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...

Full description

Bibliographic Details
Main Authors: Lei Wang, Xiaodong Wang
Format: Article
Language:English
Published: Elsevier 2019-01-01
Series:MethodsX
Online Access:http://www.sciencedirect.com/science/article/pii/S2215016119300391
Description
Summary:The segment tree is an extremely versatile data structure. In this paper, a new array 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 array based segment tree implementation. Each interval in a set S = {I1, I2, ⋯ , In} of n intervals can be insert into or delete from the heap based segment tree in O(log n) time. All the primary computational geometry problems can be solved efficiently. Method name: Segment Tree, Keywords: Data structures, Algorithms, Segment tree, Stabbing counting queries
ISSN:2215-0161