0% found this document useful (0 votes)
40 views

Complete Binary Tree

The document discusses complete binary trees. A complete binary tree is a binary tree where each internal node has exactly two children and all leaves are at the same depth. A binary tree is considered complete if each node has either two children or no children. The document provides an example of a complete binary tree where the number of nodes doubles at each level, with the root node at level 0 having 2 nodes, level 1 having 2^1 nodes, and level n having 2^n nodes.

Uploaded by

Akif Vohra
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPS, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

Complete Binary Tree

The document discusses complete binary trees. A complete binary tree is a binary tree where each internal node has exactly two children and all leaves are at the same depth. A binary tree is considered complete if each node has either two children or no children. The document provides an example of a complete binary tree where the number of nodes doubles at each level, with the root node at level 0 having 2 nodes, level 1 having 2^1 nodes, and level n having 2^n nodes.

Uploaded by

Akif Vohra
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPS, PDF, TXT or read online on Scribd
You are on page 1/ 4

DATA

STRUCTURES

MAHESH GOYANI
MAHATMA GANDHI INSTITUE OF TECHNICAL EDUCATION & RESEARCH CENTER
[email protected]

(C) GOYANI MAHESH 1


COMPLETE
BINARY TREE

(C) GOYANI MAHESH 2


COMPLETE BINARY TREE

 A complete binary tree of depth d is the strictly binary all of whose leaves are at level
d.
 A Binary tree T is called complete if each node of T can have exactly Two children

0
A

B 1 C 1

D 2 E 2 F 2 G 2

H 3 I J 3 K L 3 M 3 N 3 O 3

(C) GOYANI MAHESH 3


COMPLETE BINARY TREE

A Level 0: 20 nodes

B C Level 1: 21 nodes

D E F G Level 2: 22 nodes

H I J K L M N O Level 3: 23 nodes

(C) GOYANI MAHESH 4

You might also like