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 / vaishali naidu

If root is at level 0 then :
Case 0:
When level is 1 max nodes is 1
Case 1:
When level is 1 then max would be 3.
Case 2:
When level is 2 then max nodes would be 7

So formula would be 2^(n+1) -1

2^(0+1)-1=1
2^(1+1)-1=3
2^(2+1)-1=7

Is This Answer Correct ?    6 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is stack and its operations?

800


What do you mean by spanning tree?

1019


Which is better hashset or treeset?

943


Why is merge sort faster?

831


Are linked lists considered linear or non-linear data structure?

966


In tree construction which is the suitable efficient data structure?

975


What is map keyset?

807


What are three common types of traversals?

916


Does arraylist have a tostring?

843


What is heap tree?

880


Which sorting technique is best?

979


How helpful is abstract data type of data structures?

822


Is vector a collection?

820


How to find if linked list has loop?

1048


What is rule regarding overriding equals and hascode method?

864