A Fast Parallelizable Algorithm for Constructing Balanced Binary Search Trees
We suggest a new non-recursive algorithm for constructing a balanced binary search tree given an array of numbers. The algorithm has O ( N ) time and O (1) auxiliary memory complexity if the given array of N numbers is sorted. The resulting tree is of minimal height and can be transformed into a com...
Saved in:
| Published in | SN computer science Vol. 3; no. 5; p. 367 |
|---|---|
| Main Author | |
| Format | Journal Article |
| Language | English |
| Published |
Singapore
Springer Nature Singapore
01.09.2022
Springer Nature B.V |
| Subjects | |
| Online Access | Get full text |
| ISSN | 2661-8907 2662-995X 2661-8907 |
| DOI | 10.1007/s42979-022-01285-9 |
Cover
| Summary: | We suggest a new non-recursive algorithm for constructing a balanced binary search tree given an array of numbers. The algorithm has
O
(
N
) time and
O
(1) auxiliary memory complexity if the given array of
N
numbers is sorted. The resulting tree is of minimal height and can be transformed into a complete binary search tree while retaining minimal height with
O
(
log
N
)
time and
O
(1) auxiliary memory. The algorithm allows simple and effective parallelization resulting in time complexity
O
(
(
N
/
s
)
+
s
+
log
N
)
, where
s
is the number of parallel threads. |
|---|---|
| Bibliography: | ObjectType-Article-1 SourceType-Scholarly Journals-1 ObjectType-Feature-2 content type line 14 |
| ISSN: | 2661-8907 2662-995X 2661-8907 |
| DOI: | 10.1007/s42979-022-01285-9 |