null
US
Sign In
Sign Up for Free
Sign Up
We have detected that Javascript is not enabled in your browser. The dynamic nature of our site means that Javascript must be enabled to function properly. Please read our
terms and conditions
for more information.
Next up
Copy and Edit
You need to log in to complete this action!
Register for Free
36925620
Trees
Description
Mind Map on Trees, created by Angelica Cordero on 11/06/2022.
Mind Map by
Angelica Cordero
, updated more than 1 year ago
More
Less
Created by
Angelica Cordero
over 2 years ago
1
0
0
Resource summary
Trees
General Trees
Terminology: parent, child, ancestor, descendant
Tree: With the exception of the top element, each element in a tree has a parent element and zero or more children elements
Top element = root
Set of nodes storing elements
Edge: pair of nodes (u,v): u is the parent of v
Path: sequence of nodes
Tree ADT
getElement() root() parent(p) children(p) numChildren(p)
Binary Trees
Ordered tree
Every node has at most two children
Each child is labeled as being either left child or right child
A left child precedes a right child in the order of children of a node
Binary Tree ADT
left(p) right(p) sibling(p)
Implementing Trees
Linked Structure
addRoot(e) addLeft(p,e) addRight(p,e) set(p,e) remove (p)
Tree Traversal Algorithms
Traversal: systematic way of accessing all the positions of the tree
Preorder traversal: the root of T is visited first and then the subtrees rooted at its children are traversed recursively
Postorden traversal: it recursively traverses the subtrees rooted at the children of the root first, an then visits the root
Inorder traversal: visiting the nodes of T from left to right
Media attachments
Captura+De+Pantalla+2022 06 11+133342 (binary/octet-stream)
Show full summary
Hide full summary
Want to create your own
Mind Maps
for
free
with GoConqr?
Learn more
.
Similar
Evergreen Trees
CAROLINA PR
mapa
henry portillo
The Norman Conquest 1066-1087
adam.melling
GCSE REVISION TIMETABLE
haameem1999
Maths
xcathyx99
GCSE History – The early years and the Weimar Republic 1918-1923
Ben C
Chemistry Rates of Reaction Revision
11mzroser
MAPA MENTAL
blanca beatriz m
L'environnement
Bryony Whitehead
Carbohydrates
kevinlinkovoor
Two years and no baby
Zahra Habeeb
Browse Library