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 |
There are 2 tables: EMP : EmpId, Ename, Sal, DeptId DEPT : DeptId, Dname Write a query to find out emp names and their department names. if any emp has null in Deptid the it shows ?No Department?. Write a query to find out those department names which has no employee. Write a query to find out those employees whose salary is greater than their department?s average salary.
write algo for cobol program whichuse three flat file to extract some specific information 8 marks mainframe
What do you understand by modular programming?
if heap sort contains n elements, no of comparsions required are
what is different between kenerl mode and user mode?
THERE ARE 4 SOURCE FILES WHICH CONTAINS SAME METADATA CREATE A TARGET THAT SHOULD DISPLAY THE FILE NAME ALONG WITH THE RECORD PLEASE SEND THE ANSWERFOR THIS QUESTION WITH MAPPING
Artficial language is provided which of the language?
Diff between IF and where ?
how will you code the subfile which is in editing mode (multiple case subfile)?
What is Partial class and its use?
is it possible to desable particular parameter of the normal orcle report based on some condition ?????? if yes,wht is the function for desabling a parameter...
Need guidewire related Documents(Interview Question/Tips/Best Practice/Dumps)