Binary Tree | Root |
Node | Leaf Node |
Parent | Child |
Siblings | Subtree |
The top node in a hierarchical structure. | A tree data structure in which each node has at most two children, which are referred to as the left child and the right child. |
A node that has no children, meaning it is at the end of a branch. | The basic building block of the tree, which holds data and references to its left and right children. |
A node that is a direct descendant of another node. A node can have a left child and a right child. | A node that has one or more children. Every node, except the root, has one parent. |
A portion of the tree that consists of a node and all its descendants. | Nodes that share the same parent. |
Depth | Full Binary Tree |
Complete Binary Tree | Insertion |
Deletion | Heap Data Structures |
Huffman Coding | Traversal Algorithms |
A tree structure where every node, except for the leaves, has exactly two children. | The number of edges from the root to a specific node. The root is at depth zero. |
Involves adding a new node while maintaining the tree's properties by placing the new node in the correct position based on its value. | A tree where all levels are fully filled except possibly for the last level, which is filled from left to right. |
Used in priority queues for efficient access to max/min elements. | Can be more complex as it requires careful consideration of the node's children, with different cases arising depending on whether the node to be deleted has zero, one, or two children. |
Crucial in searching, sorting, and evaluating hierarchical data. | Used in data compression to represent variable-length codes. |
Decision Trees | Game Trees |
Balanced Binary Tree | Unbalanced Binary Tree |
Preorder Traversal | Inorder Traversal |
Postorder Traversal | Level-Order Traversal |
Represent possible moves in two-player games for decision-making. | Used in machine learning for classification tasks. |
A tree structure where the nodes are arranged in a skewed manner, potentially degenerating into a linked list and adversely affecting operation time complexity. | A tree structure that maintains a height difference of at most one between its left and right subtrees, promoting efficient performance for operations. |
A technique where the nodes are visited in the order: left subtree, root, right subtree. | A method where the nodes are visited in the order: root, left subtree, right subtree. |
A method of visiting nodes in a tree data structure by exploring all nodes at the current depth level before moving on to nodes at the next depth level. | A strategy where the nodes are visited in the order: left subtree, right subtree, root. |
Breadth-First Traversal | |
A tree traversal technique that processes all sibling nodes before proceeding to their children, ensuring that nodes are visited in a level-wise manner. | |