what is the height of tree if leaf node is at level 3. please
explain



what is the height of tree if leaf node is at level 3. please explain..

Answer / Pramod Kumar Kanoujiya

The height of a binary tree can be calculated by counting the maximum number of edges from the root to any leaf node. Since a leaf node has no children, and you mentioned that the leaf node is at level 3, the tree must have a maximum of 2 levels above the leaf node (including the root) and 1 level below it.nThe height of this tree would be 3.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

what does " calloc" do?

7 Answers   Cadence, Logos,


int a=2,b=3,c=4; printf("a=%d,b=%d\n",a,b,c); what is the o/p?

6 Answers   Verifone,


What is property type c?

1 Answers  


main() { char p[] = "hello world!"; p = "vector"; printf("%s",p); }

2 Answers   Vector, Vector India,


If null and 0 are equivalent as null pointer constants, which should I use?

1 Answers  


When should the const modifier be used?

1 Answers  


can you explain in brief what is "r+" mode in a file... i know that it si used to read and modify rhe existing content.... but explalanation about the file pointer in "r+" mode i wann to know???????????

2 Answers   Cognizant,


How does free() know explain how much memory to release?

1 Answers  


What are types of structure?

1 Answers  


Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.

1 Answers  


a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f

1 Answers   TCS,


Which node is more powerful and can handle local information processing or graphics processing?

1 Answers  


Categories