SlideShare une entreprise Scribd logo
1  sur  16
DATA STRUCTURE
     TREE
  1109052 Jusahadi Silalahi
  1109058 Kiagus Almuklis
  1109064 Tri Reski
Tree
• Tree is one form of non-linear data structure that
  describes a hierarchical relationship (one to
  many relationship) between these elements.
Cont’d
BINARY TREE
• binary tree is a tree data structure in which each
  node has at most two child node, usually
  distinguished as "left" and "right". Nodes with
  children are parents node, and child nodes may
  contain references to their parents. Outside the
  tree, there is often a reference to the "root" node
  (the ancestor of all nodes), if it exists. Any node in
  the data structure can be reached by starting at
  root node and repeatedly following references to
  either the left or right child.
Full Binary Tree
Complete Binary Tree
Skewed Binary Tree
BINARY SEARCH TREE
GRAPH
• graph is an abstract data type that is meant to
  implement the graph and hypergraph concepts
  from mathematics
HEAP SORT
• Heapsort is a comparison-based sorting algorithm to
  create a sorted array (or list), and is part of
  the selection sort family. Although somewhat slower
  in practice on most machines than a well
  implemented quicksort, it has the advantage of a
  more favorable worst-case O(n log n) runtime.
  Heapsort is an in-place algorithm, but is not a stable
  sort.
Cont’d
HOW to Write Tree



Contoh Tree Sederhana   Contoh Notasi Tingkat / Indentasi
Cont’d



                Contoh Diagram Venn




Notasi Kurung
(A(B(D)(E))(C(F)(G)))
TRANSVERSAL TREE
1. Pre Order

• Go to root node
• Left Subtree
• Right Subtree
Cont’d
2. In Order

• Left Subtree
• Go to root node
• Right Subtree
Cont’d
3. Post Order

• Left Subtree
• Right Subtree
• Go to root node

Contenu connexe

Tendances

Introductiont To Aray,Tree,Stack, Queue
Introductiont To Aray,Tree,Stack, QueueIntroductiont To Aray,Tree,Stack, Queue
Introductiont To Aray,Tree,Stack, Queue
Ghaffar Khan
 
Tree in data structure
Tree in data structureTree in data structure
Tree in data structure
ghhgj jhgh
 
Data structure
Data structureData structure
Data structure
Mohd Arif
 
Lecture 1 data structures and algorithms
Lecture 1 data structures and algorithmsLecture 1 data structures and algorithms
Lecture 1 data structures and algorithms
Aakash deep Singhal
 
Data structures and Alogarithims
Data structures and AlogarithimsData structures and Alogarithims
Data structures and Alogarithims
Victor Palmar
 

Tendances (20)

Introduction To Data Structures.
Introduction To Data Structures.Introduction To Data Structures.
Introduction To Data Structures.
 
Introductiont To Aray,Tree,Stack, Queue
Introductiont To Aray,Tree,Stack, QueueIntroductiont To Aray,Tree,Stack, Queue
Introductiont To Aray,Tree,Stack, Queue
 
Bca ii dfs u-3 tree and graph
Bca  ii dfs u-3 tree and graphBca  ii dfs u-3 tree and graph
Bca ii dfs u-3 tree and graph
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structure
 
1.introduction to data_structures
1.introduction to data_structures1.introduction to data_structures
1.introduction to data_structures
 
Abstract data types (adt) intro to data structure part 2
Abstract data types (adt)   intro to data structure part 2Abstract data types (adt)   intro to data structure part 2
Abstract data types (adt) intro to data structure part 2
 
Lecture1 data structure(introduction)
Lecture1 data structure(introduction)Lecture1 data structure(introduction)
Lecture1 data structure(introduction)
 
Data Structures 4
Data Structures 4Data Structures 4
Data Structures 4
 
Presentation on Data Structure
Presentation on Data StructurePresentation on Data Structure
Presentation on Data Structure
 
Tree in data structure
Tree in data structureTree in data structure
Tree in data structure
 
358 33 powerpoint-slides_10-trees_chapter-10
358 33 powerpoint-slides_10-trees_chapter-10358 33 powerpoint-slides_10-trees_chapter-10
358 33 powerpoint-slides_10-trees_chapter-10
 
Data structure
Data structureData structure
Data structure
 
Introduction To Data Structures
Introduction To Data StructuresIntroduction To Data Structures
Introduction To Data Structures
 
Lecture 1 data structures and algorithms
Lecture 1 data structures and algorithmsLecture 1 data structures and algorithms
Lecture 1 data structures and algorithms
 
Struktur data ppt
Struktur data pptStruktur data ppt
Struktur data ppt
 
data structure
data structuredata structure
data structure
 
Data structures and Alogarithims
Data structures and AlogarithimsData structures and Alogarithims
Data structures and Alogarithims
 
data structure
data structuredata structure
data structure
 
Data structure
Data structureData structure
Data structure
 
DATA STRUCTURE
DATA STRUCTUREDATA STRUCTURE
DATA STRUCTURE
 

En vedette (9)

Perbandingan macam macam dbms
Perbandingan macam macam dbmsPerbandingan macam macam dbms
Perbandingan macam macam dbms
 
Modul praktikum-so-2013
Modul praktikum-so-2013Modul praktikum-so-2013
Modul praktikum-so-2013
 
Soal tugas kelompok
Soal tugas kelompokSoal tugas kelompok
Soal tugas kelompok
 
Tugas dbms
Tugas dbmsTugas dbms
Tugas dbms
 
Tugas db1
Tugas db1Tugas db1
Tugas db1
 
Catatan singkat prak pbol
Catatan singkat prak pbolCatatan singkat prak pbol
Catatan singkat prak pbol
 
Tugas komas
Tugas komasTugas komas
Tugas komas
 
Making change
Making changeMaking change
Making change
 
Sistem Informasi Manajemen " Office Automation "
Sistem Informasi Manajemen " Office Automation "Sistem Informasi Manajemen " Office Automation "
Sistem Informasi Manajemen " Office Automation "
 

Similaire à Tree

splaytree-171227043127.pptx NNNNNNNNNNNNNNNNNNNNNNN
splaytree-171227043127.pptx NNNNNNNNNNNNNNNNNNNNNNNsplaytree-171227043127.pptx NNNNNNNNNNNNNNNNNNNNNNN
splaytree-171227043127.pptx NNNNNNNNNNNNNNNNNNNNNNN
ratnapatil14
 
cppggggggggggggggggggggggggggggggggggggggg.pptx
cppggggggggggggggggggggggggggggggggggggggg.pptxcppggggggggggggggggggggggggggggggggggggggg.pptx
cppggggggggggggggggggggggggggggggggggggggg.pptx
ShruthiS594607
 
tree-160731205832.pptx
tree-160731205832.pptxtree-160731205832.pptx
tree-160731205832.pptx
MouDhara1
 

Similaire à Tree (20)

Mca iii dfs u-4 tree and graph
Mca iii dfs u-4 tree and graphMca iii dfs u-4 tree and graph
Mca iii dfs u-4 tree and graph
 
Bsc cs ii dfs u-3 tree and graph
Bsc cs  ii dfs u-3 tree and graphBsc cs  ii dfs u-3 tree and graph
Bsc cs ii dfs u-3 tree and graph
 
Unit 3 trees
Unit 3   treesUnit 3   trees
Unit 3 trees
 
Tree 11.ppt
Tree 11.pptTree 11.ppt
Tree 11.ppt
 
Trees in data structure
Trees in data structureTrees in data structure
Trees in data structure
 
splaytree-171227043127.pptx NNNNNNNNNNNNNNNNNNNNNNN
splaytree-171227043127.pptx NNNNNNNNNNNNNNNNNNNNNNNsplaytree-171227043127.pptx NNNNNNNNNNNNNNNNNNNNNNN
splaytree-171227043127.pptx NNNNNNNNNNNNNNNNNNNNNNN
 
Tree
TreeTree
Tree
 
Splay tree
Splay treeSplay tree
Splay tree
 
Data Structures 5
Data Structures 5Data Structures 5
Data Structures 5
 
cppggggggggggggggggggggggggggggggggggggggg.pptx
cppggggggggggggggggggggggggggggggggggggggg.pptxcppggggggggggggggggggggggggggggggggggggggg.pptx
cppggggggggggggggggggggggggggggggggggggggg.pptx
 
Module 8.1 Trees.pdf
Module 8.1 Trees.pdfModule 8.1 Trees.pdf
Module 8.1 Trees.pdf
 
Binary tree
Binary  treeBinary  tree
Binary tree
 
Tree
TreeTree
Tree
 
tree-160731205832.pptx
tree-160731205832.pptxtree-160731205832.pptx
tree-160731205832.pptx
 
trees in data structure
trees in data structure trees in data structure
trees in data structure
 
Zippers: Derivatives of Regular Types
Zippers: Derivatives of Regular TypesZippers: Derivatives of Regular Types
Zippers: Derivatives of Regular Types
 
Biary search Tree.docx
Biary search Tree.docxBiary search Tree.docx
Biary search Tree.docx
 
Binary trees
Binary treesBinary trees
Binary trees
 
Farhana shaikh webinar_treesindiscretestructure
Farhana shaikh webinar_treesindiscretestructureFarhana shaikh webinar_treesindiscretestructure
Farhana shaikh webinar_treesindiscretestructure
 
data_structures_and_applications_-_module-4.ppt
data_structures_and_applications_-_module-4.pptdata_structures_and_applications_-_module-4.ppt
data_structures_and_applications_-_module-4.ppt
 

Dernier

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Dernier (20)

Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 

Tree

  • 1. DATA STRUCTURE TREE 1109052 Jusahadi Silalahi 1109058 Kiagus Almuklis 1109064 Tri Reski
  • 2. Tree • Tree is one form of non-linear data structure that describes a hierarchical relationship (one to many relationship) between these elements.
  • 4. BINARY TREE • binary tree is a tree data structure in which each node has at most two child node, usually distinguished as "left" and "right". Nodes with children are parents node, and child nodes may contain references to their parents. Outside the tree, there is often a reference to the "root" node (the ancestor of all nodes), if it exists. Any node in the data structure can be reached by starting at root node and repeatedly following references to either the left or right child.
  • 9. GRAPH • graph is an abstract data type that is meant to implement the graph and hypergraph concepts from mathematics
  • 10. HEAP SORT • Heapsort is a comparison-based sorting algorithm to create a sorted array (or list), and is part of the selection sort family. Although somewhat slower in practice on most machines than a well implemented quicksort, it has the advantage of a more favorable worst-case O(n log n) runtime. Heapsort is an in-place algorithm, but is not a stable sort.
  • 12. HOW to Write Tree Contoh Tree Sederhana Contoh Notasi Tingkat / Indentasi
  • 13. Cont’d Contoh Diagram Venn Notasi Kurung (A(B(D)(E))(C(F)(G)))
  • 14. TRANSVERSAL TREE 1. Pre Order • Go to root node • Left Subtree • Right Subtree
  • 15. Cont’d 2. In Order • Left Subtree • Go to root node • Right Subtree
  • 16. Cont’d 3. Post Order • Left Subtree • Right Subtree • Go to root node