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
Addition of new records in a Binary tree structure always occurs as leaf nodes, which are further away from the root node making their access slower. If this new record is to be ac

How divide and conquer technique can be applied to binary trees?  As the binary tree definition itself separates a binary tree into two smaller structures of the similar type,

What is the best-case number of comparisons performed by mergesort on an input sequence of 2 k distinct numbers?

Explain State Space Tree If it is convenient to execute backtracking by constructing a tree of choices being made, the tree is known as a state space tree. Its root indicates a

In the previous unit, we have discussed arrays. Arrays are data structures of fixed size. Insertion and deletion involves reshuffling of array elements. Thus, array manipulation

write an algorithm to find the average number of occurances of MECHANIL in an english passage

solve the following relation by recursive method: T(n)=2T(n^1/2)+log n

A company is carrying out a survey by observing traffic at a road junction. Every time a car, bus or lorry passed by road junction it was noted down. 10 000 vehicles were counted d

It is a naturally occurring sorting method exemplified through a card player arranging the cards dealt to him. He picks up the cards like they are dealt & added them into the neede

Q. Write down an algorithm to sort a given list by making use of Quick sort method. Describe the behaviour of Quick sort when input given to us is already sorted.