0% found this document useful (0 votes)
1 views6 pages

Binary Search Tree Travers Al

Uploaded by

prajwal reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views6 pages

Binary Search Tree Travers Al

Uploaded by

prajwal reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 6

BINARY SEARCH

TREE TRAVERSAL
BINARY SEARCH TREE
• Tree is a Non-Linear Data-Structure.
• Binary Tree is a type of tree in which a tree node has atmost two
children.
• Binary Search Tree is a type of Binary Tree in which the child less than
parent will be in the left of the parent and if child is greater it will be
the right side.
BST REPRESENTATION
• BST is represented using Linked List.
• Linked List has 3 parts.
• Data part – Stores the Value.
• Left pointer – Pointer which points the left child.
• Right pointer – Pointer which points the right child.
BST TRAVERSAL
• Traversal is the process of travelling all the nodes of the tree.
• Traversal in BST is done using recursion.
• There are three Traversal technique.
• In-order
• Pre-order
• Post-order
TRAVERSAL TECHNIQUE
• In-order : the left node will be traversed first , root after that and right
node will be the last one.
• Pre-order : the root will be traversed first , left node after that and
right node will be the last one.
• Post-order : the left node will be traversed first , right node after that
and finally the root will be traversed.
THANK YOU

You might also like