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 |
what is the software to run the GSM gate opener program
how many keywords are present in "c"?
18 Answers Assurgent, Cynosure Software, IBM,
While joining files if only two files are mentioned with jfile keyword, do we required to use join keyword????
What are the compilers of JAVA and .NET Programming languages?
What is a programming language?
what is meaning of MDM in sap?let me know that meaning
what is integration testing in real time applications?
Hi..Am done with my Masters recently..Am planning to learn TIBCO.. could anyone suggest me about how the job market will be and Is there any course necessary to learn prior to Tibco..i mean any prerequisite. I dnt have any knowledge on PL/SQL thats it... Plz suggest me in a best way...
how to run servlets in eclipse 3.3.2....if we choose file->new->servlet then after that it is showing javax.servlet.* ...cannot be resolved.......to avoid this error any external jar file is to be added? please help me regarding this issue........thank u
kindly send interview materials
How to convert numeric value into words in c#????plz suggest me the coding of this question???
how to display xisheet in list box in c# .net