0% found this document useful (0 votes)
17 views4 pages

3.binary Tree With An Example

The document explains the concept of binary trees, a type of data structure where each node can have a maximum of two children. It describes different types of binary trees, including Strictly Binary Trees, Complete Binary Trees, and Extended Binary Trees, highlighting their unique characteristics and uses. The document also provides definitions and examples for each type of binary tree.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views4 pages

3.binary Tree With An Example

The document explains the concept of binary trees, a type of data structure where each node can have a maximum of two children. It describes different types of binary trees, including Strictly Binary Trees, Complete Binary Trees, and Extended Binary Trees, highlighting their unique characteristics and uses. The document also provides definitions and examples for each type of binary tree.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

2/21/23, 11:08 PM Data Structures Tutorials - Binary Tree with an example

(../index.html)

 (../index.html)  (../courses.html) ✏ (../authors.html)  (../downloads.html)  (../contact-us.html) 

Data Structures
Place your ad here

 Previous (tree-representations.html) Next  (binary-tree-representations.html)

Binary Tree Datastructure


In a normal tree, every node can have any number of children. A binary tree is a special type of tree data structure in which every node can have a maximum of 2
children. One is known as a left child and the other is known as right child.

A tree in which every node can have a maximum of two children is called Binary Tree.

In a binary tree, every node can have either 0 children or 1 child or 2 children but not more than 2 children.

Example

www.btechsmartclass.com/data_structures/binary-tree.html 1/4
2/21/23, 11:08 PM Data Structures Tutorials - Binary Tree with an example

There are different types of binary trees and they are...

1. Strictly Binary Tree


In a binary tree, every node can have a maximum of two children. But in strictly binary tree, every node should have exactly two children or none. That means every

internal node must have exactly two children. A strictly Binary Tree can be defined as follows...

A binary tree in which every node has either two or zero number of children is called Strictly Binary Tree

Strictly binary tree is also called as Full Binary Tree or Proper Binary Tree or 2-Tree

Strictly binary tree data structure is used to represent mathematical expressions.

Example

www.btechsmartclass.com/data_structures/binary-tree.html 2/4
2/21/23, 11:08 PM Data Structures Tutorials - Binary Tree with an example

2. Complete Binary Tree


In a binary tree, every node can have a maximum of two children. But in strictly binary tree, every node should have exactly two children or none and in complete
binary tree all the nodes must have exactly two children and at every level of complete binary tree there must be 2level number of nodes. For example at level 2 there

must be 22 = 4 nodes and at level 3 there must be 23 = 8 nodes.

A binary tree in which every internal node has exactly two children and all leaf nodes are at same level is called Complete Binary Tree.

Complete binary tree is also called as Perfect Binary Tree

3. Extended Binary Tree


A binary tree can be converted into Full Binary tree by adding dummy nodes to existing nodes wherever required.

The full binary tree obtained by adding dummy nodes to a binary tree is called as Extended Binary Tree.

www.btechsmartclass.com/data_structures/binary-tree.html 3/4
2/21/23, 11:08 PM Data Structures Tutorials - Binary Tree with an example

In above figure, a normal binary tree is converted into full binary tree by adding dummy nodes (In pink colour).

 Previous (tree-representations.html) Next  (binary-tree-representations.html)

Place your ad here

Place your ad here

Courses (../courses.html) | Downloads (../downloads.html) | About Us (../authors.html) | Contcat Us (../contact-us.html)

Website designed by Rajinikanth B



   (https://www.youtube.com/channel/UC9YHZpCPtRqbYpu-
(https://www.facebook.com/btechsmartclass/)
(https://plus.google.com/116706303219518006305)
(https://twitter.com/BtechClass)
NVP8Ecg)

www.btechsmartclass.com/data_structures/binary-tree.html 4/4

You might also like