encyclopegia.org

Binary search tree

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 \Theta(\log n) for n nodes.…

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 \Theta(\log n) for n nodes. In the worst case, they degrade to that of a singly linked list: O(n) . 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. ==History== The binary search tree algorithm was discovered independently by several researchers, including P.F. Windley, Andrew Donald Booth, Andrew Colin, Thomas N. Hibbard. The algorithm is attributed to Conway Berners-Lee and David Wheeler, who used it for storing labeled data in magnetic tapes in 1960. One of the earliest and popular binary search tree algorithm is that of Hibbard. The time complexity of a binary search tree increases boundlessly with the tree height if the nodes are inserted in an arbitrary order, therefore self-balancing binary search trees were introduced to bound the height of the tree to O(\log n) . Various height-balanced binary search trees were introduced to confine the tree height, such as AVL trees, Treaps, and red–black trees. ==Overview== A binary search tree is a rooted binary tree in which nodes are arranged in strict total order in which the nodes with keys greater than any particular node A is stored on the right sub-trees to that node A and the nodes with keys equal to or less than A are stored on the left sub-trees to A, satisfying the binary search property. Binary search trees are also efficacious in sortings and search algorithms. However, the search complexity of a BST depends upon the order in which the nodes are inserted and deleted; since in worst case, successive operations in the binary search tree may lead to degeneracy and form a singly linked list (or "unbalanced tree") like structure, thus has the same worst-case complexity as a linked list. Binary search trees are also a fundamental data structure used in construction of abstract data structures such as sets, multisets, and associative arrays. ==Operations== ===Searching=== Searching in a binary search tree for a specific key can be programmed recursively or iteratively. Searching begins by examining the root node. If the tree is , the key being searched for does not exist in the tree. Otherwise, if the key equals that of the root, the search is successful and the node is returned. If the key is less than that of the root, the search proceeds by examining the left subtree. Similarly, if the key is greater than that of the root, the search proceeds by examining the right subtree. This process is repeated until the key is found or the remaining subtree is \text{nil} . If the searched key is not found after a \text{nil} subtree is reached, then the key is not present in the tree. ====Recursive search==== The following pseudocode implements the BST search procedure through recursion. The recursive procedure continues until a \text{nil} or the \text{key} being searched for are encountered. ====Iterative search==== The recursive version of the search can be "unrolled" into a while loop. On most machines, the iterative version is found to be more efficient. Since the search may proceed till some leaf node, the running time complexity of BST search is O(h) where h is the height of the tree. However, the worst case for BST search is O(n) where n is the total number of nodes in the BST, because an unbalanced BST may degenerate to a linked list. However, if the BST is height-balanced the height is O(\log n) . ====Successor and predecessor==== For certain operations, given a node \text{x} , finding the successor or predecessor of \text{x} is crucial. Assuming all the keys of a BST are distinct, the successor of a node \text{x} in a BST is the node with the smallest key greater than \text{x} 's key. On the other hand, the predecessor of a node \text{x} in a BST is the node with the largest key smaller than \text{x} 's key. The following pseudocode finds the successor and predecessor of a node \text{x} in a BST. Operations such as finding a node in a BST whose key is the maximum or minimum are critical in certain operations, such as determining the successor and predecessor of nodes. Following is the pseudocode for the operations. ===Insertion=== Operations such as insertion and deletion cause the BST representation to change dynamically. The data structure must be modified in such a way that the properties of BST continue to hold. New nodes are inserted as leaf nodes in the BST. Following is an iterative implementation of the insertion operation. The procedure maintains a "trailing pointer" \text{y} as a parent of \text{x} . After initialization on line 2, the while loop along lines 4-11 causes the pointers to be updated. If \text{y} is \text{nil} , the BST is empty, thus \text{z} is inserted as the root node of the binary search tree \text{T} , if it is not \text{nil} , insertion proceeds by comparing the keys to that of \text{y} on the lines 15-19 and the node is inserted accordingly. ===Deletion=== The deletion of a node, say \text{Z} , from the binary search tree \text{BST} has three cases: If \text{Z} is a leaf node, it is replaced by \text{NIL} as shown in (a). If \text{Z} has only one child, the child node of \text{Z} gets elevated by modifying the parent node of \text{Z} to point to the child node, consequently taking \text{Z} 's position in the tree, as shown in (b) and (c). If \text{Z} has both left and right children, the in-order successor of \text{Z} , say \text{Y} , displaces \text{Z} by following the two cases: If \text{Y} is \text{Z} 's right child, as shown in (d), \text{Y} displaces \text{Z} and \text{Y} 's right child remain unchanged. If \text{Y} lies within \text{Z} 's right subtree but is not \text{Z} 's right child, as shown in (e), \text{Y} first gets replaced by its own right child, and then it displaces \text{Z} 's position in the tree. Alternatively, the in-order predecessor can also be used. The following pseudocode implements the deletion operation in a binary search tree. The \text{BST-Delete} procedure deals with the 3 special cases mentioned above. Lines 2-3 deal with case 1; lines 4-5 deal with case 2 and lines 6-16 for case 3. The helper function \text{Shift-Nodes} is used within the deletion algorithm for the purpose of replacing the node \text{u} with \text{v} in the binary search tree \text{BST} . This procedure handles the deletion (and substitution) of \text{u} from \text{BST} . ==Traversal== A BST can be traversed through three basic algorithms: inorder, preorder, and postorder tree walks. Inorder tree walk: Nodes from the left subtree get visited first, followed by the root node and right subtree. Such a traversal visits all the nodes in the order of non-decreasing key sequence. Preorder tree walk: The root node gets visited first, followed by left and right subtrees. Postorder tree walk: Nodes from the left subtree get visited first, followed by the right subtree, and finally, the root. Following is a recursive implementation of the tree walks. ==Balanced binary search trees== Without rebalancing, insertions or deletions in a binary search tree may lead to degeneration, resulting in a height n of the tree (where n is number of items in a tree), so that the lookup performance is deteriorated to that of a linear search. Keeping the search tree balanced and height bounded by O(\log n) is a key to the usefulness of the binary search tree. This can be achieved by "self-balancing" mechanisms during the updation operations to the tree designed to maintain the tree height to the binary logarithmic complexity. ==Examples of applications== ===Sort=== Binary search trees are used in sorting algorithms such as tree sort, where all the elements are inserted at once and the tree is traversed at an in-order fashion. BSTs are also used in quicksort. ===Priority queue operations=== Binary search trees are used in implementing priority queues, using the node's key as priorities. Adding new elements to the queue follows the regular BST insertion operation but the removal operation depends on the type of priority queue: If it is an ascending order priority queue, removal of an element with the lowest priority is done through leftward traversal of the BST. If it is a descending order priority queue, removal of an element with the highest priority is done through rightward traversal of the BST. ==See also== Search tree Join-based tree algorithms Optimal binary search tree Geometry of binary search trees Ternary search tree ==References== ==Further reading== ==External links== Ben Pfaff: An Introduction to Binary Search Trees and Balanced Trees. (PDF; 1675 kB) 2004. Binary Search Tree Visualization

References

  1. Pitassi, Toniann. CSC263: Balanced BSTs, AVL tree . 2015. · retrieved 2026-05-31 · rev 1357250297
    Cite this reference

    MLA "Pitassi, Toniann. CSC263: Balanced BSTs, AVL tree . 2015." Pitassi, Toniann. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297. Accessed 24 November 2026.

    Chicago "Pitassi, Toniann. CSC263: Balanced BSTs, AVL tree . 2015." Pitassi, Toniann. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297.

    APA Pitassi, Toniann. (2026). Pitassi, Toniann. CSC263: Balanced BSTs, AVL tree . 2015. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1357250297

  2. vertical-align:top · retrieved 2026-05-31 · rev 1357250297
    Cite this reference

    MLA "vertical-align:top." rp|290 {| |- style="vertical-align:top" | Recursive-Tree-Search(x, key) if x = NIL or key = x. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297. Accessed 24 November 2026.

    Chicago "vertical-align:top." rp|290 {| |- style="vertical-align:top" | Recursive-Tree-Search(x, key) if x = NIL or key = x. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297.

    APA rp|290 {| |- style="vertical-align:top" | Recursive-Tree-Search(x, key) if x = NIL or key = x. (2026). vertical-align:top. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1357250297

  3. Ray. Binary Search Tree . Loyola Marymount University, Department of Com . retrieved 17 May 2022 · retrieved 2026-05-31 · rev 1357250297
    Cite this reference

    MLA "Ray. Binary Search Tree . Loyola Marymount University, Department of Com . retrieved 17 May 2022." Ray. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297. Accessed 24 November 2026.

    Chicago "Ray. Binary Search Tree . Loyola Marymount University, Department of Com . retrieved 17 May 2022." Ray. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297.

    APA Ray. (2026). Ray. Binary Search Tree . Loyola Marymount University, Department of Com . retrieved 17 May 2022. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1357250297

  4. vertical-align:top · retrieved 2026-05-31 · rev 1357250297
    Cite this reference

    MLA "vertical-align:top." rp|292–293 {| |- style="vertical-align:top" | BST-Successor(x) if x. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297. Accessed 24 November 2026.

    Chicago "vertical-align:top." rp|292–293 {| |- style="vertical-align:top" | BST-Successor(x) if x. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297.

    APA rp|292–293 {| |- style="vertical-align:top" | BST-Successor(x) if x. (2026). vertical-align:top. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1357250297

  5. Advanced Data Structure . Cambridge University Press . January 2011. · retrieved 2026-05-31 · rev 1357250297
    Cite this reference

    MLA "Advanced Data Structure . Cambridge University Press . January 2011." Advanced Data Structure. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297. Accessed 24 November 2026.

    Chicago "Advanced Data Structure . Cambridge University Press . January 2011." Advanced Data Structure. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297.

    APA Advanced Data Structure. (2026). Advanced Data Structure . Cambridge University Press . January 2011. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1357250297

  6. On the Average Number of Rebalancing Operations in Weight-Balanced Trees . · retrieved 2026-05-31 · rev 1357250297
    Cite this reference

    MLA "On the Average Number of Rebalancing Operations in Weight-Balanced Trees ." 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297. Accessed 24 November 2026.

    Chicago "On the Average Number of Rebalancing Operations in Weight-Balanced Trees ." 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297.

    APA encyclopegia.org. (2026). On the Average Number of Rebalancing Operations in Weight-Balanced Trees . Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1357250297

  7. Lehman, Tobin J. A Study of Index Structures for Main Memory Database Managem . · retrieved 2026-05-31 · rev 1357250297
    Cite this reference

    MLA "Lehman, Tobin J. A Study of Index Structures for Main Memory Database Managem ." Lehman, Tobin J. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297. Accessed 24 November 2026.

    Chicago "Lehman, Tobin J. A Study of Index Structures for Main Memory Database Managem ." Lehman, Tobin J. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297.

    APA Lehman, Tobin J. (2026). Lehman, Tobin J. A Study of Index Structures for Main Memory Database Managem . Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1357250297

  8. 30th Annual Symposium on Foundations of Computer Science . · retrieved 2026-05-31 · rev 1357250297
    Cite this reference

    MLA "30th Annual Symposium on Foundations of Computer Science ." th Annual Symposium on Foundations of Computer Science. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297. Accessed 24 November 2026.

    Chicago "30th Annual Symposium on Foundations of Computer Science ." th Annual Symposium on Foundations of Computer Science. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297.

    APA th Annual Symposium on Foundations of Computer Science. (2026). 30th Annual Symposium on Foundations of Computer Science . Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1357250297

  9. Introduction to Algorithms . · retrieved 2026-05-31 · rev 1357250297
    Cite this reference

    MLA "Introduction to Algorithms ." 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297. Accessed 24 November 2026.

    Chicago "Introduction to Algorithms ." 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297.

    APA encyclopegia.org. (2026). Introduction to Algorithms . Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1357250297

  10. Sleator, Daniel D. Self-Adjusting Binary Search Trees . · retrieved 2026-05-31 · rev 1357250297
    Cite this reference

    MLA "Sleator, Daniel D. Self-Adjusting Binary Search Trees ." Sleator, Daniel D. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297. Accessed 24 November 2026.

    Chicago "Sleator, Daniel D. Self-Adjusting Binary Search Trees ." Sleator, Daniel D. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297.

    APA Sleator, Daniel D. (2026). Sleator, Daniel D. Self-Adjusting Binary Search Trees . Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1357250297

  11. cs.princeton.edu Princeton University School of Engineering and Applied Science . Princeton University School of Engineering and Applied Science . · retrieved 2026-05-31 · rev 1357250297
    Cite this reference

    MLA "cs.princeton.edu Princeton University School of Engineering and Applied Science . Princeton University School of Engineering and Applied Science ." cs. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297. Accessed 24 November 2026.

    Chicago "cs.princeton.edu Princeton University School of Engineering and Applied Science . Princeton University School of Engineering and Applied Science ." cs. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297.

    APA cs. (2026). cs.princeton.edu Princeton University School of Engineering and Applied Science . Princeton University School of Engineering and Applied Science . Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1357250297

  12. Myers, Andrew. CS 312 Lecture: AVL Trees . · retrieved 2026-05-31 · rev 1357250297
    Cite this reference

    MLA "Myers, Andrew. CS 312 Lecture: AVL Trees ." Myers, Andrew. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297. Accessed 24 November 2026.

    Chicago "Myers, Andrew. CS 312 Lecture: AVL Trees ." Myers, Andrew. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297.

    APA Myers, Andrew. (2026). Myers, Andrew. CS 312 Lecture: AVL Trees . Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1357250297

  13. web.archive.org Princeton University School of Engineering and Applied Science . Princeton University School of Engineering and Applied Science . (archived copy) · retrieved 2026-05-31 · rev 1357250297
    Cite this reference

    MLA "web.archive.org Princeton University School of Engineering and Applied Science . Princeton University School of Engineering and Applied Science . (archived copy)." web. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297. Accessed 24 November 2026.

    Chicago "web.archive.org Princeton University School of Engineering and Applied Science . Princeton University School of Engineering and Applied Science . (archived copy)." web. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297.

    APA web. (2026). web.archive.org Princeton University School of Engineering and Applied Science . Princeton University School of Engineering and Applied Science . (archived copy). Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1357250297

  14. A Connection Between Binary Search Trees and Quicksort . · retrieved 2026-05-31 · rev 1357250297
    Cite this reference

    MLA "A Connection Between Binary Search Trees and Quicksort ." 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297. Accessed 24 November 2026.

    Chicago "A Connection Between Binary Search Trees and Quicksort ." 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297.

    APA encyclopegia.org. (2026). A Connection Between Binary Search Trees and Quicksort . Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1357250297

  15. Myers, Andrew. CS 2112 Lecture and Recitation Notes: Priority Q . Cornell University, Cornell University College of Engineering . · retrieved 2026-05-31 · rev 1357250297
    Cite this reference

    MLA "Myers, Andrew. CS 2112 Lecture and Recitation Notes: Priority Q . Cornell University, Cornell University College of Engineering ." Myers, Andrew. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297. Accessed 24 November 2026.

    Chicago "Myers, Andrew. CS 2112 Lecture and Recitation Notes: Priority Q . Cornell University, Cornell University College of Engineering ." Myers, Andrew. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297.

    APA Myers, Andrew. (2026). Myers, Andrew. CS 2112 Lecture and Recitation Notes: Priority Q . Cornell University, Cornell University College of Engineering . Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1357250297

  16. Adelson-Velsky, Georgy. An algorithm for the organization of information . 1962. · retrieved 2026-05-31 · rev 1357250297
    Cite this reference

    MLA "Adelson-Velsky, Georgy. An algorithm for the organization of information . 1962." Adelson-Velsky, Georgy. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297. Accessed 24 November 2026.

    Chicago "Adelson-Velsky, Georgy. An algorithm for the organization of information . 1962." Adelson-Velsky, Georgy. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297.

    APA Adelson-Velsky, Georgy. (2026). Adelson-Velsky, Georgy. An algorithm for the organization of information . 1962. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1357250297

  17. Culberson, J. academic.oup.com . 1 January 1989. · retrieved 2026-05-31 · rev 1357250297
    Cite this reference

    MLA "Culberson, J. academic.oup.com . 1 January 1989." Culberson, J. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297. Accessed 24 November 2026.

    Chicago "Culberson, J. academic.oup.com . 1 January 1989." Culberson, J. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297.

    APA Culberson, J. (2026). Culberson, J. academic.oup.com . 1 January 1989. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1357250297

  18. Analysis of the standard deletion algorithms in exact fit domain binary search trees . Springer Publishing, University of Waterloo . 2. · retrieved 2026-05-31 · rev 1357250297
    Cite this reference

    MLA "Analysis of the standard deletion algorithms in exact fit domain binary search trees . Springer Publishing, University of Waterloo . 2." Analysis of the standard deletion algorithms in exact fit domain binary search trees. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297. Accessed 24 November 2026.

    Chicago "Analysis of the standard deletion algorithms in exact fit domain binary search trees . Springer Publishing, University of Waterloo . 2." Analysis of the standard deletion algorithms in exact fit domain binary search trees. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297.

    APA Analysis of the standard deletion algorithms in exact fit domain binary search trees. (2026). Analysis of the standard deletion algorithms in exact fit domain binary search trees . Springer Publishing, University of Waterloo . 2. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1357250297

  19. The time complexity of a binary search tree increases boundlessly with the tree height if the nodes are inserted in an arbitrary order, therefore self-balancing binary search trees were introduced . · retrieved 2026-05-31 · rev 1357250297
    Cite this reference

    MLA "The time complexity of a binary search tree increases boundlessly with the tree height if the nodes are inserted in an arbitrary order, therefore self-balancing binary search trees were introduced ." The time complexity of a binary search tree increases boundlessly with the tree height if the nodes are inserted in an a. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297. Accessed 24 November 2026.

    Chicago "The time complexity of a binary search tree increases boundlessly with the tree height if the nodes are inserted in an arbitrary order, therefore self-balancing binary search trees were introduced ." The time complexity of a binary search tree increases boundlessly with the tree height if the nodes are inserted in an a. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297.

    APA The time complexity of a binary search tree increases boundlessly with the tree height if the nodes are inserted in an a. (2026). The time complexity of a binary search tree increases boundlessly with the tree height if the nodes are inserted in an arbitrary order, therefore self-balancing binary search trees were introduced . Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1357250297

  20. red-black tree · retrieved 2026-05-31 · rev 1357250297
    Cite this reference

    MLA "red-black tree." Paul E. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297. Accessed 24 November 2026.

    Chicago "red-black tree." Paul E. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297.

    APA Paul E. (2026). red-black tree. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1357250297

  21. Thareja, Reema. Data Structures Using C . Oxford University Press . 13 October 2018. · retrieved 2026-05-31 · rev 1357250297
    Cite this reference

    MLA "Thareja, Reema. Data Structures Using C . Oxford University Press . 13 October 2018." Thareja, Reema. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297. Accessed 24 November 2026.

    Chicago "Thareja, Reema. Data Structures Using C . Oxford University Press . 13 October 2018." Thareja, Reema. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297.

    APA Thareja, Reema. (2026). Thareja, Reema. Data Structures Using C . Oxford University Press . 13 October 2018. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1357250297

  22. Cormen, Thomas H. mitpress.mit.edu . · retrieved 2026-05-31 · rev 1357250297
    Cite this reference

    MLA "Cormen, Thomas H. mitpress.mit.edu ." Cormen, Thomas H. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297. Accessed 24 November 2026.

    Chicago "Cormen, Thomas H. mitpress.mit.edu ." Cormen, Thomas H. 2026-05-31. https://en.wikipedia.org/w/index.php?oldid=1357250297.

    APA Cormen, Thomas H. (2026). Cormen, Thomas H. mitpress.mit.edu . Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1357250297

Cite this article

MLA

"Binary search tree." encyclopegia.org, 2026, https://encyclopegia.org/wiki/binary-search-tree. Accessed 24 November 2026.

Chicago

"Binary search tree." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/binary-search-tree.

APA

encyclopegia.org. (2026). Binary search tree. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/binary-search-tree

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

binary numeral system

stub · references available

Google Search

stub · references available

Ti -Tree

stub · references available

search and rescue dog

stub · references available

Siberian Tree Frog

stub · references available

Olive-tree Warbler

stub · references available

binary compound

stub · references available

Tree Pipit

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1357250297 · 0.5 · snapshot enwiki-001357250297

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.