SlideShare a Scribd company logo
Binary Search Trees
By Asseged Fikru
btrees - 2
 Outlines
• Tree
• Binary Search Tree
• Traversal
btrees - 3
Tree
Tree
Each node can have 0 or more children on
tree
Binary tree
• Tree with 0–2 children per node
btrees - 4
A binary search tree (BST)
 A binary search tree is node Based binary tree
data structure.
 Each node has A key and Associated value
parent
left child right child
btrees - 5
Properties of Trees and Nodes
» internal node has 1 or
more children,
root node
leaf nodes
internal
nodes
btrees - 6
Properties of Trees and Nodes
 root node is the
highest node in the tree
structure, and it has no parent
 siblings: two nodes that have
the same parent
 edge: the link from one node
to another
 null is Empty
root
siblings
edge
btrees - 7
TRAVERSAL
 Is systematic ways of vesting nodes in a three
There are three different types of depth-first
traversals
i. Pre-order traversal
ii. In-order traversal
iii. Post-order traversal
btrees - 8
Pre-order traversal
has 3 steps
 Visit Node
 traversal left sub-tree
 traversal Right sub-tree
23 18 12 20 44 35 52
btrees - 9
In-order traversal
 Traverse the left sub-tree
 Visit the root.
 traversal the Right sub-tree
12 18 20 23 35 44 52
btrees - 10
Post-order traversal
 Traverse the left sub-tree
 traversal the Right sub-tree
 Visit the root
12 20 18 35 52 44 23
btrees - 11
Thank You
IEEEAsseged@gmail.com

More Related Content

PPTX
Data structure(Part 2)
PPT
Data Structures 4
PPT
Binary trees
PPTX
Trees in data structures
PPTX
PPTX
Data structure(Part 2)
Data Structures 4
Binary trees
Trees in data structures

What's hot (20)

PPTX
Mca iii dfs u-4 tree and graph
PPT
Tree data structure
PPTX
Tree(Directed and undirected tree)
PPTX
Unit 6 tree
PPT
introduction to_trees
PPTX
Unit – vi tree
PPTX
Data structures 3
PPT
358 33 powerpoint-slides_10-trees_chapter-10
PPTX
Tree chapter
PDF
Lecture notes data structures tree
PPTX
1.introduction to data_structures
PPT
Chapter 8 ds
PPTX
PPTX
Introduction to tree ds
PPTX
PPTX
Farhana shaikh webinar_treesindiscretestructure
PPTX
PPTX
Bca ii dfs u-3 tree and graph
PPTX
Tree in data structure
PPT
Binary tree in data structures
Mca iii dfs u-4 tree and graph
Tree data structure
Tree(Directed and undirected tree)
Unit 6 tree
introduction to_trees
Unit – vi tree
Data structures 3
358 33 powerpoint-slides_10-trees_chapter-10
Tree chapter
Lecture notes data structures tree
1.introduction to data_structures
Chapter 8 ds
Introduction to tree ds
Farhana shaikh webinar_treesindiscretestructure
Bca ii dfs u-3 tree and graph
Tree in data structure
Binary tree in data structures
Ad

Similar to A binary tree (20)

PPTX
Tree structure and its definitions with an example
PPTX
Binary tree
PPTX
Weak 13 Trees, BST update.pptxhjjujjjhhhy
PPTX
DS-UNIT-4zjufrusefihfacbciauhfbaiuhc.pptx
PPTX
UNIT-4 (1).pptx ok thanks for the party o
PPTX
Data Structures using Python(generic elective).pptx
PPT
BINARY SEARCH TREE
PPTX
UNIT III Non Linear Data Structures - Trees.pptx
PPT
Binary Search Tree Traversal.ppt
PPTX
Binary Tree in Data Structure
PPTX
data structures module III & IV.pptx
PPT
Binary Trees.ppt
PPTX
Binary Search Tree In Python.pptx
PPTX
BINARY TREE data structure and algorithm-1.pptx
PPTX
unit-2-data structure and algorithms-tree-2024-1.pptx
PPTX
Binary tree
PPTX
Introduction-to-Trees-in-Data-Structures-and-Algorithms[1].pptx
PPTX
UNIT III Non Linear Data Structures - Trees.pptx
PPTX
learn tree, linked list, queue, stack, and other algo
PPTX
Lecture 09 - Binary Search Trees.pptx mission Sk it
Tree structure and its definitions with an example
Binary tree
Weak 13 Trees, BST update.pptxhjjujjjhhhy
DS-UNIT-4zjufrusefihfacbciauhfbaiuhc.pptx
UNIT-4 (1).pptx ok thanks for the party o
Data Structures using Python(generic elective).pptx
BINARY SEARCH TREE
UNIT III Non Linear Data Structures - Trees.pptx
Binary Search Tree Traversal.ppt
Binary Tree in Data Structure
data structures module III & IV.pptx
Binary Trees.ppt
Binary Search Tree In Python.pptx
BINARY TREE data structure and algorithm-1.pptx
unit-2-data structure and algorithms-tree-2024-1.pptx
Binary tree
Introduction-to-Trees-in-Data-Structures-and-Algorithms[1].pptx
UNIT III Non Linear Data Structures - Trees.pptx
learn tree, linked list, queue, stack, and other algo
Lecture 09 - Binary Search Trees.pptx mission Sk it
Ad

Recently uploaded (20)

DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
Encapsulation theory and applications.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Approach and Philosophy of On baking technology
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
KodekX | Application Modernization Development
The AUB Centre for AI in Media Proposal.docx
Programs and apps: productivity, graphics, security and other tools
Advanced methodologies resolving dimensionality complications for autism neur...
20250228 LYD VKU AI Blended-Learning.pptx
Encapsulation_ Review paper, used for researhc scholars
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Spectroscopy.pptx food analysis technology
Encapsulation theory and applications.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
MIND Revenue Release Quarter 2 2025 Press Release
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Approach and Philosophy of On baking technology
Understanding_Digital_Forensics_Presentation.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Spectral efficient network and resource selection model in 5G networks
KodekX | Application Modernization Development

A binary tree

  • 1. Binary Search Trees By Asseged Fikru
  • 2. btrees - 2  Outlines • Tree • Binary Search Tree • Traversal
  • 3. btrees - 3 Tree Tree Each node can have 0 or more children on tree Binary tree • Tree with 0–2 children per node
  • 4. btrees - 4 A binary search tree (BST)  A binary search tree is node Based binary tree data structure.  Each node has A key and Associated value parent left child right child
  • 5. btrees - 5 Properties of Trees and Nodes » internal node has 1 or more children, root node leaf nodes internal nodes
  • 6. btrees - 6 Properties of Trees and Nodes  root node is the highest node in the tree structure, and it has no parent  siblings: two nodes that have the same parent  edge: the link from one node to another  null is Empty root siblings edge
  • 7. btrees - 7 TRAVERSAL  Is systematic ways of vesting nodes in a three There are three different types of depth-first traversals i. Pre-order traversal ii. In-order traversal iii. Post-order traversal
  • 8. btrees - 8 Pre-order traversal has 3 steps  Visit Node  traversal left sub-tree  traversal Right sub-tree 23 18 12 20 44 35 52
  • 9. btrees - 9 In-order traversal  Traverse the left sub-tree  Visit the root.  traversal the Right sub-tree 12 18 20 23 35 44 52
  • 10. btrees - 10 Post-order traversal  Traverse the left sub-tree  traversal the Right sub-tree  Visit the root 12 20 18 35 52 44 23
  • 11. btrees - 11 Thank You IEEEAsseged@gmail.com