How to Implement a Binary Search Tree

Scott Cosentino
6 min readNov 5, 2019

A binary search tree, or BST, is a type of data structure typically used to organize data. It is structured in a very different way compared to stacks, queues and lists. Generally, a BST will have the following properties.

1. The tree has a root node that is used as the starting point for any operation

2. Each node in the tree has one or two nodes attached to it. One is to the right of the node, and the other is to the left.

3. Everything to the right of a node is larger in value compared to it. Everything to the…

--

--