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


In computer programming, Trees are utilized enormously. These can be utilized for developing database search times (binary search trees, AVL trees, 2-3 trees, red-black trees), Gam

INSERT FUNCTION /*prototypes of insert & find functions */ list * insert_list(list *); list * find(list *, int); /*definition of  anyinsert function */ list * inser

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

How To implement stack using two queues , analyze the running time of the stack operations ?

1) Which graph traversal uses a queue to hold vertices which are to be processed next ? 2) Which of the graph traversal is recursive by nature? 3) For a dense graph, Prim's a

what is circular doubly link list?write down the algorithm for insertion of elements in circular doubly link list

Describe different methods of developing algorithms with examples.

State the complex reallocation procedure Some languages provide arrays whose sizes are established at run-time and can change during execution. These dynamic arrays have an in