Mapa mental
Binary Trees
Conteúdo do mapa
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
Informações
- Descrição
- Computer Science Mapa Mental sobre Binary Trees, criado por Sam Beazley em 10-03-2021.
- Criado por
- Sam Beazley
- Visualizações
- 0
- Avaliação