Introduction To Binary Search Tree

Shaila Nasrin
Learn Coding Concepts with Shaila
3 min readApr 15, 2019

--

A tree data structure is a way to hold data that looks like a tree when it’s visualized. For example:

All data points in a tree is called nodes. The top of the tree is called the root node and from the root it branches out into additional nodes called child node. Each of these child nodes may have more child nodes. Nodes with branches leading to other nodes are called the parent. And nodes that branches out from the parent is called child node and each children that parent of other tree makes their own sub-tree. Branches at the end of the tree which doesn’t have any child is called leaf nodes.

What is Binary Search Tree?

A tree data structure can have any number of branches from every node but in binary tree each node only has two branches. And binary search tree is binary tree that is ordered. That means each left sub-tree is less than or equal to the parent node and each right sub-tree is greater than or equal to the parent node. In fact the picture above is a example to binary search tree.

Why Use Binary Search Tree?

Because the use the principle of binary search, on average the operations are able to skips about half of the tree. So, for each for search, insertion and deletion takes time proportional to the logarithm of number of items stored…

--

--