Building optimal binary search trees from sorted values in O(N) time

5Citations
Citations of this article
1Readers
Mendeley users who have this article in their library.
Get full text

Abstract

First, we present a simple algorithm which, given a sorted sequence of node values, can build a binary search tree of minimum height in O(N) time. The algorithm works with sequences whose length is, a priori, unknown. Previous algorithms [1-3] required the number of elements to be known in advance. Although the produced trees are of minimum height, they are generally unbalanced. We then show how to convert them into optimal trees with a minimum internal path length in O(log N) time. The trees produced, both minimum height and optimal, have characteristic shapes which can easily be predicted from the binary representation of tree size. © Springer-Verlag Berlin Heidelberg 2004.

Cite

CITATION STYLE

APA

Vaucher, J. G. (2004). Building optimal binary search trees from sorted values in O(N) time. Lecture Notes in Computer Science (Including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 2635, 376–388. https://doi.org/10.1007/978-3-540-39993-3_17

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free