# What is the difference between binary and binary search trees?

By | July 15, 2020

In this Post, We will understand What is the difference between binary and binary search trees?

Binary Tree Data Structure

A tree is called a binary tree if each note has zero children, one child, or two children, an empty tree is also a valid binary tree. we can visualize a binary tree consisting of a root and two disjoint binary trees called the left and right subtrees of the root. Binary Tree

Binary Search Tree (BST) Data Structure

Binary Search Tree or BST is a node-based binary tree data structure which are having the following properties:

• The left subtree of a node contains only nodes with values smaller value than the root node’s value.
• The right subtree of a node contains only nodes with values greater than the root node’s value.
• The left and right subtrees are also must be a binary search tree.
• You should note that Binary Search Tree(BST) must not be duplicate nodes. Some Key difference between Binary Tree and Binary Search Trees are:

 Binary Tree Binary Search Tree (BST) Binary Tree is unordered that’s why it is slower in the process of insertion, deletion, and search operations. Insertion, deletion, and searching of an element is faster in Binary Search Tree than Binary Tree due to the ordered features. Binary Tree does not maintain order in terms of how the nodes are arranged Binary Search tree the left subtree Nodes values are less than the root node’s value and the right subtree Nodes values are greater than the root node’s value.

You May Also Like:

That’s all about What is the difference between binary and binary search trees?
If you have any feedback or suggestion please feel free to drop in below comment box.