This repository contains a comprehensive journey of learning and implementing Binary Trees in Java, starting from basic tree construction to solving advanced tree-based problems.
- Introduction
- Tree Construction
- Basic Operations
- Traversals
- Advanced Questions
- How to Run
- Contributing
- License
A Binary Tree is a hierarchical data structure in which each node has at most two children: left and right. It is widely used in coding interviews and system design.
- Creating nodes using a class
Node
- Building tree manually or using array input
- Recursive tree builders
class Node {
int data;
Node left, right;
Node(int val) {
data = val;
left = right = null;
}
}