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

Is hashset synchronized?

1069


Describe what is Node in link list? And name the types of Linked Lists?

971


What are the major data structures used in the rdbms?

1083


What is the difference between static and dynamic data?

1044


What does sorting an array do?

987


How many types of data structures are there?

1195


What is the use of space complexity and time complexity?

1075


What is quick sort?

1111


What does bubble sort do?

869


Can you dynamically allocate arrays in expanded memory?

1095


What is the complexity of adding an element to the heap?

987


What is the use of treemap?

1012


What are the issues that hamper the efficiency in sorting a file?

1065


How does a hashmap work?

985


Write an algorithm to show various operations on ordered list and arrays

971