If a binary tree is constructed using nodes with two pointers each,how many null pointers does a tree with N nodes have?A. n-1B. nC. n+1D. Depends on the number of edges

Showing Answers 1 - 4 of 4 Answers

saravanan

  • Aug 2nd, 2005
 

n+1

  Was this answer useful?  Yes

RaniSKumar

  • Nov 26th, 2006
 

let the total no of nodes = n

let the no: of leaf nodes = x

total nodes in terms of leaf nodes = 2x -1

i.e 2x-1 =n

x=(n+1)/2

since each leaf node has 2 empty pointers

no of empx pointer = 2x = n+1

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions