Search Tree Data Structure


A search tree, also known as a binary search tree, is a type of binary tree that organizes nodes based on their key values. For keys with number data types, any number less that the root will be a node on the left of it, while any number greater than the root will be on the right. This pattern follows for all subsequent sub trees. Every parent node's left child will be smaller (have a lesser value) than it, and its right child will be larger. This is an incredibly useful implementation of a tree because it makes finding nodes very easy.


An example of a valid binary search tree: