Data Structure: Unit III: Trees

Binary Tree ADT

Definition, Syntax, Example Operations | Data Structure

A binary tree is a finite set of nodes which is either empty or consists of a root and two disjoint binary trees called the left subtree and right subtree.

Binary Tree ADT

• Definition of a binary tree: A binary tree is a finite set of nodes which is either empty or consists of a root and two disjoint binary trees called the left subtree and right subtree.

•  The binary tree can be as shown below -

Abstract DataType BinT (node * root)

{

Instances

: Binary tree is a nonlinear data structure which contains every node except the leaf nodes at most two child nodes.

Operations:

1. Insertion :

This operation is used to insert the nodes in the binary tree. By inserting desired number of nodes, the binary tree gets created.

2. Deletion :

This operation is used to remove any node from the tree. Note that if root node is removed the tree becomes empty.

}

Data Structure: Unit III: Trees : Tag: : Definition, Syntax, Example Operations | Data Structure - Binary Tree ADT