Mindmap
Binary Trees
Inhalt der Mindmap
Binary Trees
Root (first node)
- Can have repeating elements.
- Can be structured or not
- Leaves (nodes without children)
- Can have one or two children
Example (Binary Search Tree): Organized
- Root
- Left children
- Root > Left
- left child 1
- left child 2
- Right Children
- Root < Right
- right child 1
- right child 2
- Value principle applies to subtrees also
- Elements on the left side will always be less than the root.
- Elements on the right side will always be greater than the root and the left side.
- Inserting and searching elements follow the same pattern of recursively comparing the target element to whether that element is greater than or less than the left or right children.
- Happens recursively in python.
- Inserting and searching elements follow the same pattern of recursively comparing the target element to whether that element is greater than or less than the left or right children.
- Elements on the right side will always be greater than the root and the left side.
- Elements on the left side will always be less than the root.
- Left children
- Dictated by ordered relationships
- Current element
- Greater than
- Less than
- Current element
- Root
Informationen
- Beschreibung
- Mindmap am Binary Trees, erstellt von Phuc Pham am 23/10/2021.
- Erstellt von
- Phuc Pham
- Aufrufe
- 0
- Bewertung