Mind map
Binary Search Tree
Map content
Binary Search Tree
Root (this is the topmost node in the tree)
- Right Subtree: is always greater than the root
- A Leaf is an element with no children of its ow
- Left Subtree: is always less than the root
- A node is an object that contains an element
- Right Subtree: is always greater than the root
non-linear Hierarchial Data Structure
Searching for an element
- First check to see if there is more elements in the tree or is this the first
- Next we check to see if the element is already in the tree
- If Yes then the computer returns the node
- If No then the computer recursively continue
- We go the right if the element is GREATER
- We go to the left if the element is SMALLER
- Next we check to see if the element is already in the tree
- First check to see if there is more elements in the tree or is this the first
Inserting an element
- First, check if there is elements in the tree
- If Yes, we begin the process at the root
- If no we create our root
- Next, we ask if the new element is greater than the current Node element
- If Yes, we check if there is existing right child
- If Yes, we recursively delegate to the right
- If No, we create a new right child
- If No, we check if there is an existing left child
- If No, we create a new left child
- If Yes, we recursively delegate to the left
- If Yes, we check if there is existing right child
- First, check if there is elements in the tree
Information
- Description
- Mind Map on Binary Search Tree, created by Yanella Arboleda on 28/10/2021.
- Created by
- Yanella Arboleda
- Views
- 0
- Rating