If the depth of a tree is 3 levels, then what is the Size of the Tree?

Skill/Topic: Tree
A) 8
Explanation: You calculate the size of a tree by using the following formula: size = 2 ^ depth If the depth is 3 levels, then the size is 8, as shown here: 8 = 2 ^ 3

Showing Answers 1 - 12 of 12 Answers

shyam

  • Jan 27th, 2006
 

the answer is (2 to power 3)-1

i.e 7

f2003062

  • Oct 31st, 2006
 

We can not say..!First of all it depends on the type of the tree (Ex:binary Tree)...Even if it is a binary tree we can not define its size using its depth..For example look at the following tree 15 / 13 NULL / 10 14In the above binary Tree the depth of is = 3 but the size is = 4 The NULL node is not considered when we calculating the size of the Tree,right..!

  Was this answer useful?  Yes

durga

  • Apr 8th, 2015
 

but y v should take 2^n or 2^n-1

  Was this answer useful?  Yes

durga

  • Apr 8th, 2015
 

but y v shld use 2^n or 2^n-2 formula only can any one give me the explanation

  Was this answer useful?  Yes

Shubh

  • Nov 5th, 2018
 

ANS 8 is correct, 7 is not listed.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions