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
What do you mean by collision in hashing?
Can we modify final arraylist?
What is a subtree?
How many types of linked list are there?
What is the two-dimensional array?
What is a static structure?
Model a data structure for a DFA that takes an event as parameter and performs a desired action.
How do you solve a selection sort?
What is stack and its operations?
What is difference between map and hashmap?
Write program for Quick sort ?
What is the basic of data structure?
What is the space complexity of quicksort?
Which is the simplest file structure?
Define depth and height of a tree?