Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the maximum total number of nodes in a tree that has
N levels? Note that the root is level (zero)

Answer Posted / mahfooz

2^N-1

because root is at level 0. and there are n levels only.
so last level i.e level of leaves should be n-1. for maximum
we will consider complete binary tree which is full at level
n-1.

for 0 level -> 2^0 i.e 1 element
for 1 level -> 2^1
...
so on

for n-1 levle ->2^(n-1) nodes
---------------------------
sum = 2^n-1

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the sorting algorithm that is most suitable to be used with single linked list?

842


What data type is enum?

913


List the data structures which are used in rdbms.

863


What do you mean by general trees?

1014


What is a data structure node class?

1021


How do you initialize an arraylist?

974


Why is an array homogeneous?

860


Can we add duplicate keys in a hashmap? What will happen if we attempt to add duplicate values?

838


Explain the term recursive case?

979


What are the disadvantages of using collection classes over arrays?

1054


What do you mean by overflow and underflow?

936


Can map contain duplicate keys?

848


Which is faster hashset or treeset?

1015


Why set will not allow duplicates?

892


What is Another name of Dynamically allocating memory.

980