Binary Tree
Binary Tree
BINARY TREE
Presented By
Student Name: DEBASIS GARAI
University Roll No.: 27300121013
University Registration No.: 212730100110040(2021-22)
A tree is a popular data structure that is non-linear in nature. Unlike other data
structures like array, stack, queue, and linked list which are linear in nature, a
tree represents a hierarchical structure. A tree contains nodes and 2 pointers.
These two pointers are the left child and the right child of the parent node. The
terms of tree in detail:
•Root: The root of a tree is the topmost node of the tree that has no parent
node. There is only one root node in every tree.
•Edge: Edge acts as a link between the parent node and the child node.
•Leaf: A node that has no child is known as the leaf node. It is the last node of
the tree. There can be multiple leaf nodes in a tree.
•Depth: The depth of the node is the distance from the root node to that
particular node.
•Height: The height of the node is the distance from that node to the deepest
node of the tree.
•Height of tree: The Height of the tree is the maximum height of any node.
PROPERTIES OF A BINARY
TREE
We can insert/delete keys in moderate time (quicker than Arrays and slower than
Unordered Linked Lists). Self-balancing search trees like AVL and Red-Black trees
guarantee an upper bound of O(Logn) for insertion/deletion.
Like Linked Lists and unlike Arrays, Pointer implementation of trees don’t have an
upper limit on number of nodes as nodes are linked using pointers.
Store hierarchical data, like folder structure, organization structure, XML/HTML
data.
B-Tree and B+ Tree are used to implement indexing in databases.
Spanning Trees and shortest path trees are used in routers and bridges respectively
in computer networks.
As a workflow for compositing digital images for visual effects.
TH
AN
K
YO
U