What is the maximum total number of nodes in a tree that has
N levels? Note that the root is level (zero)
Answer Posted / gaurav gupta
(2^(N+1))-1
Suppose level is 2 then total number of nodes will be
1 root
2 left of root and right of root
2 left and right of left of root
2 left and right of right of root
so total nodes are 1+2+2+2=7
by formula (2^(2+1))-1
8-1=7
Is This Answer Correct ? | 24 Yes | 10 No |
Post New Answer View All Answers
How do you find the height of a binary tree?
Why is sorting necessary?
Which language is best for data structures and algorithms?
What are the types of array operations?
Which sorting is best?
Which file contains the definition of member functions?
Program to remove duplicate elements in an array.
Describe what is Node in link list? And name the types of Linked Lists?
What is sort order?
What is the best case complexity of quicksort?
what is Singly Linked list?
What do you mean by the term “percolate up”?
What are the Advantages and disadvantages of Array?
How do you balance a tree?
What is the difference between hashmap and arraylist?