In a full binary tree if there are L leaves, then total number of nodes N are?

Category: QuestionsIn a full binary tree if there are L leaves, then total number of nodes N are?
Editor">Editor Staff asked 4 weeks ago

In a full binary tree if there are L leaves, then total number of nodes N are?
 
(a) N = 2*L
 
(b) N = L + 1
 
(c) N = L – 1
 
(d) N = 2*L – 1
 
Question is taken from Binary Tree Properties topic in section Binary Trees of Data Structures & Algorithms I
 
I have been asked this question in an interview for job.

1 Answers
Editor">Editor Staff answered 4 weeks ago

The correct answer is (d) N = 2*L – 1
 
The explanation is: The relation between number of nodes(N) and leaves(L) is N=2*L-1.