The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+2 votes
369 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.9k points) | 369 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 (49.8k 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.8k points)
edited by


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

28,947 questions
36,793 answers
91,077 comments
34,690 users