if there are n nodes in a binary tree, how many null
pointers are there?
Answers were Sorted based on User's Feedback
Answer / anand prakash
If there are n nodes in a Binary Tree then number of null
pointers = n+1
| Is This Answer Correct ? | 58 Yes | 5 No |
Answer / fakkad
maximum(for complete binary tree) n+1
so total null pointers are <=n+1
It is equivalent to total number of leaf nodes.
| Is This Answer Correct ? | 8 Yes | 3 No |
Answer / sreenatha
let the binary tree be not symmetric , then it has n-1 edges
excluding the edges from deficient nodes(nodes that have
atmost one child) to NULL.
Suppose , the binary tree was perfectly symmetric (i.e,
every node including the root has exactly two children).
Then , the total no.of edges including the edges from leaf
nodes to NULL would be 2 * N .
So , required ans = 2*N - N-1 = N+1
| Is This Answer Correct ? | 8 Yes | 3 No |
4.Write a program to get the string in array and print that? or Without using loop print the array.
what are the advantages of sap on other software ?
In JCl , we have COND parameter.This holds comparison code and condition.It also has only and even parameters. ex: COND((4,GE),EVEN).what the comma mean here. is that 'and' or 'or'.
what is the difference between "types" and "data" in abap.
1.Mutating table
how many types of bytes are there???
In java without use of main() how to execute the program
in a VB application, where the data will be stored after manipulation? what is the syntax for that?
what is dot net framework
What is Console Application? & The purpose Of Console Application? with description.
Hi I am Rathnam, How To Remove the duplicates with out using remove duplicate stage in the datastage
Which of the following are Java modifiers?