English

A fast algorithm for constructing balanced binary search trees

Data Structures and Algorithms 2022-07-20 v4

Abstract

We suggest a new non-recursive algorithm for constructing a binary search tree given an array of numbers. The algorithm has O(N)O(N) time and O(1)O(1) memory complexity if the given array of NN numbers is sorted. The resulting tree is of minimal height and can be transformed to a complete binary search tree (retaining minimal height) with O(logN)O(\log N) time and O(1)O(1) memory. The algorithm allows simple and effective parallelization.

Keywords

Cite

@article{arxiv.1902.02499,
  title  = {A fast algorithm for constructing balanced binary search trees},
  author = {Pavel S. Ruzankin},
  journal= {arXiv preprint arXiv:1902.02499},
  year   = {2022}
}