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.
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 : the height of the tree.