GATE CSE
First time here? Checkout the FAQ!
x
+2 votes
264 views

What is the difference between

Binary Tree and Almost complete Binary tree and complete Binary Tree and full Binary Tree and Binary search Tree and Balanaced Binary Search Tree. 

Diagram would be appriciated otherwaise write 2-3 basic difference .

asked in DS by Active (1.8k points)   | 264 views

3 Answers

0 votes

Binary tree :- Any tree with max two child nodes

Full Binary tree:- Any tree with a given level h having 2^h-1 elements

complete binary tree : if we start removing elements from full binary tree ( 0 or more from rightmost leaf node )result will always be a CBT 

almost CBT : it is a complete binary tree in which  last level is not full (i.e at least one element has to be removed from full binary tree)

 

BST  is based on values values in left are less than root and values at right are more than root

e.g  

         30

12              45

for balanced BST refer

https://www.cpp.edu/~ftang/courses/CS241/notes/self%20balance%20bst.htm

answered by Veteran (44.1k points)  
edited by
@snajay sir is it allowed in almost CBT to have all the childrens on the RHS parent without filling up Left parent .
no left child must be there for corresponding right child but converse is not true e.g following tree is not almost CBT

               A

                      c

                 d           e
but in your paper pen explanation first exp from bottom it has lest child but no right chile . but on the next parent node you have given both child without filling up previous right child of lest node
Ya in bottom last part how can we show both left child as well right child of parent until unless we dnt put right child of  parent being at the same level
thanks edited now
0 votes
courses.cs.vt.edu/~cs3114/Fall09/wmcquain/Notes/T03a.BinaryTreeTheorems.pdf

i think u should give it a try.
answered by Active (2.3k points)  
0 votes

In above are the types of binary tree

answered by Boss (9.5k points)  
edited by


Top Users Jul 2017
  1. Bikram

    3782 Points

  2. manu00x

    2464 Points

  3. Debashish Deka

    1832 Points

  4. joshi_nitish

    1494 Points

  5. Arnab Bhadra

    1096 Points

  6. Arjun

    1054 Points

  7. Hemant Parihar

    1050 Points

  8. Shubhanshu

    972 Points

  9. Ahwan

    876 Points

  10. akash.dinkar12

    642 Points


23,953 questions
30,895 answers
70,108 comments
29,273 users