What is a Binary Search Tree?
A binary tree is a structure for storing ordered data. Binary trees are composed of nodes arranged hierarchically. Each node also contains a data value. Branching at each node occurs in at most two directions: left or right. Here are two different ways to represent the integers from 0 to 14 in a binary tree: More properly, these binary trees are called binary search trees, because in them each node’s right child is always greater than its parent’s value, and each left child always has a lesser value than its parent. Binary search trees are the most common use of binary trees, so the word “search” is often omitted.