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...
Main Authors: | , |
---|---|
Format: | Article |
Language: | English |
Published: |
Elsevier
2019-01-01
|
Series: | MethodsX |
Online Access: | http://www.sciencedirect.com/science/article/pii/S2215016119300391 |
id |
doaj-73d591847ceb4a74803f4d91ca6131af |
---|---|
record_format |
Article |
spelling |
doaj-73d591847ceb4a74803f4d91ca6131af2020-11-25T01:15:24ZengElsevierMethodsX2215-01612019-01-016500512A simple and space efficient segment tree implementationLei Wang0Xiaodong Wang1Facebook, Inc., Menlo Park, California, United StatesSchool of Information Science and Engineering, Fujian University of Technology, Fuzhou, China; Corresponding author.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 querieshttp://www.sciencedirect.com/science/article/pii/S2215016119300391 |
collection |
DOAJ |
language |
English |
format |
Article |
sources |
DOAJ |
author |
Lei Wang Xiaodong Wang |
spellingShingle |
Lei Wang Xiaodong Wang A simple and space efficient segment tree implementation MethodsX |
author_facet |
Lei Wang Xiaodong Wang |
author_sort |
Lei Wang |
title |
A simple and space efficient segment tree implementation |
title_short |
A simple and space efficient segment tree implementation |
title_full |
A simple and space efficient segment tree implementation |
title_fullStr |
A simple and space efficient segment tree implementation |
title_full_unstemmed |
A simple and space efficient segment tree implementation |
title_sort |
simple and space efficient segment tree implementation |
publisher |
Elsevier |
series |
MethodsX |
issn |
2215-0161 |
publishDate |
2019-01-01 |
description |
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 |
url |
http://www.sciencedirect.com/science/article/pii/S2215016119300391 |
work_keys_str_mv |
AT leiwang asimpleandspaceefficientsegmenttreeimplementation AT xiaodongwang asimpleandspaceefficientsegmenttreeimplementation AT leiwang simpleandspaceefficientsegmenttreeimplementation AT xiaodongwang simpleandspaceefficientsegmenttreeimplementation |
_version_ |
1725153530558283776 |