top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the difference between binary tree and binary search tree?

+1 vote
1,312 views
What is the difference between binary tree and binary search tree?
posted Jan 20, 2015 by Nikhil Pandey

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote
 
Best answer

Binary tree:

Tree where each node has up to two leaves.
A binary tree is simply a tree in which each node can have at most two children.

Example:

 1
 / \
2   3

A binary search tree

It is a binary tree in which the nodes are assigned values, with the following restrictions ;

-No duplicate values. 
-The left subtree of a node can only have values less than the node 
-The right subtree of a node can only have values greater than the node 

Example:

     2
    / \
   1   3
answer Jan 21, 2015 by Manikandan J
...