Binary tree and binarytree parts, Data Structure & Algorithms

Q. What do you understand by the term Binary Tree? What is the maximum number of nodes which are possible in a Binary Tree of depth d. Explain the terms given below with respect to the Binary trees
1)Strictly Binary Tree       
2) Complete Binary Tree
3) Almost Complete Binary Tree                                                               

Ans:

A binary tree is a tree in which no nodes can posses' more than two children.

Figure drawn below shows us that the binary tree consists of the root and two subtrees, Tl and Tr, both of which could possibly be empty.

1962_Binary Tree.png

 

The highest numbers of nodes a binary tree of depth d can have is 2 d+1-1.

(i)      Strictly Binary Tree:- If every non leaf node in binary tree has neither the left tree nor the right tree empty subtrees , then the tree is known as a strictly binary tree.

(ii)     Complete Binary Tree:- The complete binary tree of depth d is that strictly binary tree whose all the leaves are at level D.

(iii)     Almost  Complete  Binary  Tree:- The  binary tree  of  depth  d  is  an  almost complete binary tree if and only if:
1.Any node end at level less than d-1 has two children.
2. for any node nd in the tree with

(iv)    a right descendant at the level d, nd should have a left child and every descendant of the nd is either a leaf at level d or has two children.

Posted Date: 7/10/2012 7:25:48 AM | Location : United States







Related Discussions:- Binary tree and binarytree parts, Assignment Help, Ask Question on Binary tree and binarytree parts, Get Answer, Expert's Help, Binary tree and binarytree parts Discussions

Write discussion on Binary tree and binarytree parts
Your posts are moderated
Related Questions
Compare zero-address, one-address, two-address, and three-address machines by writing programs to compute: Y = (A – B X C) / (D + E X F) for each of the four machines. The inst

First - Fit Method: -    The free list is traversed sequentially to search the 1st free block whose size is larger than or equal to the amount requested. Once the block is found it

In the present scenario of global warming, the computer hard ware and software are also contributing for the increase in the temperature in the environment and contributing for the

Normally a potential y satisfies y r = 0 and 0 ³ y w - c vw -y v . Given an integer K³0, define a K-potential to be an array y that satisfies yr = 0 and K ³ y w - c vw -y v

CMY Model  The cyan, magenta, yellow (CMY) colour model is a subtractive model based on the colour absorption properties of paints and inks. As such it has become the standard

Write down any four applications of the queues.                                                            Ans. A pp li cation of Queue is given below (i)  Queue is

* Initialise d & pi* for each vertex v within V( g ) g.d[v] := infinity  g.pi[v] := nil g.d[s] := 0; * Set S to empty * S := { 0 }  Q := V(g) * While (V-S)

Simulation is the process of making an abstract model of a real world situation in order to be aware of the effect of modifications and alterations and the effect of introducing nu

State the Introduction to pseudocode No specific programming language is referred to; development of algorithms by using pseudocode uses generic descriptions of branching, loop

what are grounded header linked lists?