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 |
preorder of A*(B+C)/D-G
Explain the difference between an expert and a novice user. How would your strategy for designing user interfaces for an expert user differ from that for designing user interfaces for a novice user.
What r the attributes using in Win Runner?
0 Answers Tavant Technologies,
How does the type system works when there is interoperability between a COM and .Net, i mean what exactly happens there
What is the worst case of AVL tree?
hii I inntrested abt scjp certification but i dont knw abt scjp plz send details abt scjp exam and syllabus.
What are the limitation in using querystring in .net?
code for connection from windows forms to sql server
THE CHANNEL IN DATA COMMUNICATION CAN BE?
Is CTS company do serious backgroung check?
you have a computer with 80GB hard disk and ubuntu 8.04 is installed on entire hard disk.now you have to create a seprate partition for windows OS and install win XP as dual boot.write down the steps involved along with the commands
1 Answers Anand Group, Indian Navy, TCS,
What do you understand by modular programming?