Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


if there are n nodes in a binary tree, how many null
pointers are there?

Answers were Sorted based on User's Feedback



if there are n nodes in a binary tree, how many null pointers are there? ..

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

if there are n nodes in a binary tree, how many null pointers are there? ..

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

if there are n nodes in a binary tree, how many null pointers are there? ..

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

if there are n nodes in a binary tree, how many null pointers are there? ..

Answer / banti sharma

Anand Prakash is Absulutely right

Is This Answer Correct ?    6 Yes 5 No

Post New Answer

More Programming Languages AllOther Interview Questions

When we have two versions of the dot net installed how does the compiler know which version of DLL it has to select to an application.

0 Answers   Tesco,


Corillian's product is a "Component Container." Name at least 3 component

1 Answers  


how we can call xml file in java file using Android platform?

2 Answers   TCS,


how many types of operating system are avaliable?

0 Answers   IBM,


Code for display the images from drive using vb 6.0?

2 Answers   IBM,


if 3 duplicate records, by keeping one original and one duplicate record, and how to delete remaining 2 duplicates in sql server 2008

0 Answers  


To sorting array of 10 elements which sorting is best a)selection b)bubble c)tree sort

2 Answers   HP, Hughes,


Difference between HTML and DHTML?

0 Answers  


Write a program to find duplicate number from array in minimum time complexity.

0 Answers   Genpact,


can we allocate memory for interface? if no then why?

0 Answers  


Given an array of size n. It contains numbers in the range 1 to n. Each number is present at least once except for 2 numbers. Find the missing numbers.

0 Answers   Amazon,


Is CTS company do serious backgroung check?

0 Answers   CTS,


Categories