Mindmap
Binary Trees
Inhalt der Mindmap
Binary Trees
Hierarchical data structure
- Generally, each node is breaks off into left and right subtrees
- Root: first and upper node
- Leaves: Nodes without children nodes
- Node: Object containing an element
- Binary Search Trees
- Left Child < Current Node < Right Child
- Inserting an Element
- Create root node
- Is new element greater than current node's element?
- If there is a right child, move right
- If not, create new right child
- If there is a left child, move left
- If not, create new left child
- If there is a right child, move right
- Is new element greater than current node's element?
- Create root node
- Creating BST
- Construct tree
- Initialize root and number of elements
- Create insert function that calls upon node function
- Initialize root and number of elements
- Construct node
- Initialize current, right, and left element
- Create insert function based on element's value
- Initialize current, right, and left element
- Construct tree
- Inserting an Element
- Left Child < Current Node < Right Child
- Generally, each node is breaks off into left and right subtrees
Informationen
- Beschreibung
- Computer Science Mindmap am Binary Trees, erstellt von Sam Beazley am 10/03/2021.
- Erstellt von
- Sam Beazley
- Aufrufe
- 0
- Bewertung