A fast algorithm for constructing balanced binary search trees

02/07/2019
by   Pavel S. Ruzankin, et al.
0

We suggest a new non-recursive algorithm for constructing a binary search tree given an array of numbers. The algorithm has O(N) time and O(1) memory complexities if the given array of N 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( N) time and O(1) memory.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/01/2020

A novel algorithm to determine the leaf (leaves) of a binary tree from its preorder and postorder traversals

Binary trees are essential structures in Computer Science. The leaf (lea...
research
04/27/2018

Average Case Analysis of Leaf-Centric Binary Tree Sources

We study the average size of the minimal directed acyclic graph (DAG) wi...
research
03/05/2018

Controlled quantum search on structured databases

We present quantum algorithms to search for marked vertices in structure...
research
04/14/2021

Cost-constrained Minimal Steiner Tree Enumeration by Binary Decision Diagram

The Steiner tree enumeration problem is a well known problem that asks f...
research
02/20/2023

SegMobaTree: The Segmented Multilayer Online Balanced Tree for high-performance IPv6 Lookup in the Edge Network

With the development of IPv6 and edge computing, the edge network should...
research
04/18/2018

Independent Distributions on a Multi-Branching AND-OR Tree of Height 2

We investigate an AND-OR tree T and a probability distribution d on the ...
research
02/07/2020

Recursive PGFs for BSTs and DSTs

We review fundamentals underlying binary search trees and digital search...

Please sign up or login with your details

Forgot password? Click here to reset