Global Information Lookup Global Information

Binary search tree information


Binary search tree
Typetree
Invented1960
Invented byP.F. Windley, A.D. Booth, A.J.T. Colin, and T.N. Hibbard
Time complexity in big O notation
Operation Average Worst case
Search O(log n) O(n)
Insert O(log n) O(n)
Delete O(log n) O(n)
Space complexity
Space O(n) O(n)
Fig. 1: A binary search tree of size 9 and depth 3, with 8 at the root. The leaves are not drawn.

In computer science, a binary search tree (BST), also called an ordered or sorted binary tree, is a rooted binary tree data structure with the key of each internal node being greater than all the keys in the respective node's left subtree and less than the ones in its right subtree. The time complexity of operations on the binary search tree is linear with respect to the height of the tree.

Binary search trees allow binary search for fast lookup, addition, and removal of data items. Since the nodes in a BST are laid out so that each comparison skips about half of the remaining tree, the lookup performance is proportional to that of binary logarithm. BSTs were devised in the 1960s for the problem of efficient storage of labeled data and are attributed to Conway Berners-Lee and David Wheeler.

The performance of a binary search tree is dependent on the order of insertion of the nodes into the tree since arbitrary insertions may lead to degeneracy; several variations of the binary search tree can be built with guaranteed worst-case performance. The basic operations include: search, traversal, insert and delete. BSTs with guaranteed worst-case complexities perform better than an unsorted array, which would require linear search time.

The complexity analysis of BST shows that, on average, the insert, delete and search takes for nodes. In the worst case, they degrade to that of a singly linked list: . To address the boundless increase of the tree height with arbitrary insertions and deletions, self-balancing variants of BSTs are introduced to bound the worst lookup complexity to that of the binary logarithm. AVL trees were the first self-balancing binary search trees, invented in 1962 by Georgy Adelson-Velsky and Evgenii Landis.

Binary search trees can be used to implement abstract data types such as dynamic sets, lookup tables and priority queues, and used in sorting algorithms such as tree sort.

and 24 Related for: Binary search tree information

Request time (Page generated in 1.0857 seconds.)

Binary search tree

Last Update:

In computer science, a binary search tree (BST), also called an ordered or sorted binary tree, is a rooted binary tree data structure with the key of...

Word Count : 3098

Binary search algorithm

Last Update:

In computer science, binary search, also known as half-interval search, logarithmic search, or binary chop, is a search algorithm that finds the position...

Word Count : 9609

Optimal binary search tree

Last Update:

binary search tree (Optimal BST), sometimes called a weight-balanced binary tree, is a binary search tree which provides the smallest possible search...

Word Count : 2965

Binary tree

Last Update:

In computer science, a binary tree is a tree data structure in which each node has at most two children, referred to as the left child and the right child...

Word Count : 5125

Splay tree

Last Update:

splay tree is a binary search tree with the additional property that recently accessed elements are quick to access again. Like self-balancing binary search...

Word Count : 4628

Search tree

Last Update:

application stores the entire key–value pair at that particular location. A Binary Search Tree is a node-based data structure where each node contains a key and...

Word Count : 710

Treap

Last Update:

binary search tree are two closely related forms of binary search tree data structures that maintain a dynamic set of ordered keys and allow binary searches...

Word Count : 3213

Tree traversal

Last Update:

depth-first search (DFS), the search tree is deepened as much as possible before going to the next sibling. To traverse binary trees with depth-first search, perform...

Word Count : 2834

Random binary tree

Last Update:

for these trees. Random binary trees have been used for analyzing the average-case complexity of data structures based on binary search trees. For this...

Word Count : 5230

Geometry of binary search trees

Last Update:

approach to the dynamic optimality problem on online algorithms for binary search trees involves reformulating the problem geometrically, in terms of augmenting...

Word Count : 1621

AVL tree

Last Update:

computer science, an AVL tree (named after inventors Adelson-Velsky and Landis) is a self-balancing binary search tree. In an AVL tree, the heights of the...

Word Count : 4322

Tree sort

Last Update:

A tree sort is a sort algorithm that builds a binary search tree from the elements to be sorted, and then traverses the tree (in-order) so that the elements...

Word Count : 636

Interval tree

Last Update:

the intervals do not overlap and they can be inserted into a simple binary search tree and queried in O ( log ⁡ n ) {\displaystyle O(\log n)} time. However...

Word Count : 3577

Threaded binary tree

Last Update:

computing, a threaded binary tree is a binary tree variant that facilitates traversal in a particular order. An entire binary search tree can be easily traversed...

Word Count : 1201

Ternary search tree

Last Update:

ternary search tree is a type of trie (sometimes called a prefix tree) where nodes are arranged in a manner similar to a binary search tree, but with...

Word Count : 1784

Associative array

Last Update:

hash tables and search trees. It is sometimes also possible to solve the problem using directly addressed arrays, binary search trees, or other more specialized...

Word Count : 2769

Trie

Last Update:

between nodes, which represent each character in the key. Unlike a binary search tree, nodes in the trie do not store their associated key. Instead, a node's...

Word Count : 3396

Scapegoat tree

Last Update:

In computer science, a scapegoat tree is a self-balancing binary search tree, invented by Arne Andersson in 1989 and again by Igal Galperin and Ronald...

Word Count : 1886

Binary space partitioning

Last Update:

representation of objects within the space in the form of a tree data structure known as a BSP tree. Binary space partitioning was developed in the context of...

Word Count : 2852

Tree rotation

Last Update:

mathematics, tree rotation is an operation on a binary tree that changes the structure without interfering with the order of the elements. A tree rotation...

Word Count : 1443

Cartesian tree

Last Update:

used in the definition of the treap and randomized binary search tree data structures for binary search problems, in comparison sort algorithms that perform...

Word Count : 4039

Multiplicative binary search

Last Update:

level-order sequence of the corresponding balanced binary search tree. This places the first pivot of a binary search as the first element in the array. The second...

Word Count : 395

WAVL tree

Last Update:

a WAVL tree or weak AVL tree is a self-balancing binary search tree. WAVL trees are named after AVL trees, another type of balanced search tree, and are...

Word Count : 3378

Binary logarithm

Last Update:

algorithms Searching in balanced binary search trees Exponentiation by squaring Longest increasing subsequence Binary logarithms also occur in the exponents...

Word Count : 4788

PDF Search Engine © AllGlobal.net