A Fast Parallelizable Algorithm for Constructing Balanced Binary Search Trees
نویسندگان
چکیده
We suggest a new non-recursive algorithm for constructing binary search tree given an array of numbers. The has $O(N)$ time and $O(1)$ memory complexity if the $N$ numbers is sorted. resulting minimal height can be transformed to complete (retaining height) with $O(\log N)$ memory. allows simple effective parallelization.
منابع مشابه
On Digital Search Trees - A Simple Method for Constructing Balanced Binary Trees
This paper presents digital search trees, a binary tree data structure that can produce well-balanced trees in the majority of cases. Digital search tree algorithms are reviewed, and a novel algorithm for building sorted trees is introduced. It was found that digital search trees are simple to implement because their code is similar to the code for ordinary binary search trees. Experimental eva...
متن کاملSimple Balanced Binary Search Trees
Efficient implementations of sets and maps (dictionaries) are important in computer science, and balanced binary search trees are the basis of the best practical implementations. Pedagogically, however, they are often quite complicated, especially with respect to deletion. I present complete code (with justification and analysis not previously available in the literature) for a purely-functiona...
متن کاملA New Class of Balanced Search Trees: Half Balanced Binary Search Trees
— A newclassojbalancedbinary search trees is introduced: thehalf-balancedbinary trees. When used as a node search tree, a hal]-balanced binary tree containing n keys has a height at most 2 lg(n + 2) —2. Algorithms are given for IN SERT and DELETE instructions, having time complexity O(lg n). A remarkable resuit is that at most one local restructuring must be performed during the (leletion or th...
متن کاملA Genetic Algorithm for Constructing Compact Binary Decision Trees
Abstract Tree-based classifiers are important in pattern recognition and have been well studied. Although the problem of finding an optimal decision tree has received attention, it is a hard optimization problem. Here we propose utilizing a genetic algorithm to improve on the finding of compact, near-optimal decision trees. We present a method to encode and decode a decision tree to and from a ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
ژورنال
عنوان ژورنال: SN computer science
سال: 2022
ISSN: ['2661-8907', '2662-995X']
DOI: https://doi.org/10.1007/s42979-022-01285-9