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
Write an algorithm by using pseudocode which: Inputs top speeds of 5000 cars Outputs fastest speed and the slowest speed Outputs average speed of all the 5000 cars

An adjacency matrix representation of a graph cannot having information of : Parallel edges

Determine the precondition of a binary search For instance, precondition of a binary search is that array searched is sorted however checking this precondition is so expensive

Simplifying Assumptions of wire frame representation Neglect colour - consider Intensity: For now we shall forget about colour and restrict our discussion just to the intensi

Q. Perform implementation of a queue using a singly linked list L. The operations INSER and DELETE should take O (1) time.

Link list representation of a circular queue is more efficient as it employs space more competently, of course with the added cost of storing the pointers. Program 7 gives the link

Q. Explain the term hashing? Explain any five well known hash functions.                         Ans: Hashing method provides us the direct access of record from the f


Book to refer: Introduction to Algorithms, 3rd Ed, by Clifford Stein, Thomas H. Cormen, Ronald Rivest, Charles E. Leiserson Question: Tic Tac Toe game -Design a GUI and implement

Determine YIQ Colour Model Whereas an RGB monitor requires separate signals for the red, green, and blue components of an image, a television monitor uses a single composite si