Skip to content
Related Articles

Related Articles

Difference between Binary Tree and Binary Search Tree
  • Difficulty Level : Easy
  • Last Updated : 31 Oct, 2019

Binary Tree Data Structure

A tree whose elements have at most 2 children is called a binary tree. Since each element in a binary tree can have only 2 children, we typically name them the left and right child.

Binary Search Tree Data Structure

Binary Search Tree is a node-based binary tree data structure which has the following properties:

  • The left subtree of a node contains only nodes with keys lesser than the node’s key.
  • The right subtree of a node contains only nodes with keys greater than the node’s key.
  • The left and right subtree each must also be a binary search tree.
  • There must be no duplicate nodes.

Difference between Binary Tree and Binary Search Tree:

BINARY TREEBINARY SEARCH TREE
BINARY TREE is a non linear data structure where each node can have almost two child nodesBINARY SEARCH TREE is a node based binary tree which further has right and left subtree that too are binary search tree.
BINARY TREE is unordered hence slower in process of insertion, deletion and searching.Insertion, deletion, searching of an element is faster in BINARY SEARCH TREE than BINARY TREE due to the ordered characteristics
IN BINARY TREE there is no ordering in terms of how the nodes are arrangedIN BINARY SEARCH TREE the left subtree has elements less than the nodes element and the right subtree has elements greater than the nodes element.
My Personal Notes arrow_drop_up
Recommended Articles
Page :