Jul 10, 2024

**Relevel by An Academy**- India’s first hiring platform
- Job within a week
- Register for Relevel test, schedule interview with top companies
- Free registration

- Links provided in the description

**Binary Tree**: Hierarchical data structures (unlike linear data structures like arrays, stacks, queues, linked lists)**Hierarchy**: Similar to computer folders within folders**Binary**: Each node can have at most two children**Interview Relevance**: Frequently asked in interviews

**Root**: Starting point of the tree**Child**: Nodes directly connected beneath another node- E.g., node X is the child of node Y

**Leaf Node**: Nodes without children**Subtree**: Portion of the tree under a certain node**Ancestor**: Parent, grandparent, and so on of a node- E.g., node A is an ancestor of node B

- Each node has either 0 or 2 children
- E.g., Node with 2 children is “full,” node with 1 child is not

- All levels are completely filled except possibly the last level, which must be filled from the left
- E.g., Tree is complete if all nodes are present from left to right in the last level

- All leaf nodes are at the same level
- E.g., Tree where all leaf nodes are equidistant from the root

- Height must be at maximum log(n) where n is the number of nodes
- E.g., Tree height should not exceed log2(n) when n=8, height ≤ 3
- Usually for efficient searching and improving time complexity

- Each parent node has only one child
- E.g., Straight line tree essentially a linked list

**Like & Subscribe**: Support the channel for more upcoming series**Comments**: Motivation to create more content