Binary Tree
Learn Binary Tree (Trees, Data Structures & Algorithms) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
What is a Binary Tree? A hierarchical structure where each node has AT MOST two children, conventionally called left and right . Unlike a linked list (one "next"), a tree branches - which is what makes recursive algorithms so natural for it: a tree is just "a node plus two smaller trees".
More lessons in Trees
- Binary Search Tree - BST
- Full / Complete / Perfect Binary Tree
- Balanced Tree
- Tree Traversal - Preorder
- Tree Traversal - Inorder
- Tree Traversal - Postorder
- Tree Traversal - Level Order
- Recursive Traversal
- Iterative Traversal
- Height / Depth
- Diameter of a Tree
- Lowest Common Ancestor
- Path Sum
- Tree View - Left View
- Tree View - Right View
- Tree View - Top View
- Tree View - Bottom View
- Boundary Traversal
- Vertical Traversal
- Zigzag Traversal
- Serialize / Deserialize a Tree
- BST Operations
- BST Validation
- Kth Smallest / Largest in BST
- Morris Traversal