CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

A full binary tree with n non leaf nodes contain

A
log2n nodes
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
n+1 nodes
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
2n nodes
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
2n+1 nodes
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
Open in App
Solution

The correct option is B 2n+1 nodes

A full binary tree with n non leaf nodes contain 2n+1 nodes.

In a binary tree each non-leaf node provides two edges. The full tree contains 2*n nodes. Each non-leaf node connected to an ancestor consumes one edge, which is tree of all nodes except the root node of the tree. Henceforth it leaves * n+1 edges connected to leaves.

In a binary tree, a tree where each non-leaf node has exactly two sons - number of leaves is n+1. Total number of nodes is 2n+1.

A full binary tree is a tree in which every node other than the leaves has two children. A complete binary tree is a binary tree in which every level, except possibly the last, is completely filled, and all nodes are as far left as possible.


930769_918404_ans_ed70992272c74795b8d66b537bf50b29.png

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Flower
BIOLOGY
Watch in App
Join BYJU'S Learning Program
CrossIcon