Mapa mental
Binary Trees
Contenido del mapa
Binary Trees
Hierarchical Data Structure
- Node
- Left Subtree
- Right Subtree
- Example
- 5
- 8
- 7
- Leaves
- 3
- 4
- 6
- Node
- ROOT!
- 8
- 5
- Node
Inserting Elements
- Are there elements in the tree
- yes
- begin process at root
- is the
- begin process at root
- no
- create new root
- Is the new element greater than the current nodes element
- Yes
- Is there a right child?
- Yes
- Recursive function to delegate to right or left
- No
- Need new right child
- Yes
- Is there a right child?
- No
- Is there a left child?
- Yes
- Recursive function to delegate to right or left
- No
- Need new left child
- Yes
- Is there a left child?
- Yes
- Is the new element greater than the current nodes element
- create new root
- yes
- Are there elements in the tree
Search element in BST
- Are there elements in the tree?
- Yes
- Begin the Process at the root
- Does the node have the element?
- Yes
- Return the node
- No
- Recursively delegate depending whether is it smaller or larger
- Yes
- Yes
- Are there elements in the tree?
Información
- Descripción
- Mapa Mental sobre Binary Trees, creado por Samuel Licht el 09/03/2021.
- Creado por
- Samuel Licht
- Visitas
- 0
- Valoración