All books

Professional

Apps About Coach Log in Start reading

Computer Science · Glossary

What is Binary search tree?

Also known as: search-tree property

Definition 25.6 High School Computer Science · Chapter 25 — Trees and Binary Search Trees

A binary search tree is a binary tree of keys in which, at every node, the keys of the left subtree are smaller than the node’s key and the keys of the right subtree are larger.

The search tree of bst_demo.py. Every title on the left of a node comes before it in alphabetical order, every title on the right after it. The deepest node, shaded, has depth 5: the height of the tree.
The search tree of bst_demo.py. Every title on the left of a node comes before it in alphabetical order, every title on the right after it. The deepest node, shaded, has depth 55: the height of the tree.
Read in context →
Definition 17.1 University Computer Science — Year 1 · Chapter 17 — Binary Search Trees and Balanced Trees

A binary search tree is a binary tree whose nodes hold keys from an ordered set, with the search-tree property: at every node, the keys of the left subtree are smaller than the node’s key, and the keys of the right subtree are larger.

Read in context →