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 | 369 views

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

edited
@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
courses.cs.vt.edu/~cs3114/Fall09/wmcquain/Notes/T03a.BinaryTreeTheorems.pdf

i think u should give it a try.

In above are the types of binary tree