Binary Tree Data Structure
Last Updated :
14 Jun, 2025
Improve
A Binary Tree Data Structure is a hierarchical data structure in which each node has at most two children, referred to as the left child and the right child. It is commonly used in computer science for efficient storage and retrieval of data, with various operations such as insertion, deletion, and traversal.

Introduction
- Introduction to Binary Tree
- Properties of Binary Tree
- Types of Binary Tree
- Applications, Advantages and Disadvantages of Binary Tree
- Binary Tree (Array implementation)
- Complete Binary Tree
- Perfect Binary Tree
Basic Operations
- Inorder Traversal
- Preorder Traversal
- Postorder Traversal
- Level Order Tree Traversal
- Max Depth or Height of Binary Tree
- Insertion in a Binary Tree
- Deletion in a Binary Tree
- Enumeration of Binary Trees
Easy Problems
- Size of a tree
- Max in Tree
- Sum Tree
- Identical Trees
- Mirror Tree
- Cousins in Tree
- Perfect Binary Tree
- Foldable Binary Trees
- Symmetric Tree (Mirror Image of itself)
- Subtree with Given Sum
- Succinct Encoding of Binary Tree
- Get Level of a Node
- Check for Complete Binary Tree
- Depth of a full Binary Tree from Preorder
More Traversals
- BFS vs DFS for Binary Tree
- Iterative Inorder
- Iterative Preorder
- Iterative Postorder Traversal Using Two Stacks
- Morris Traversal
- Morris traversal for Preorder
- Morris Traversal for Postorder
Medium Problems
- Diameter of a Binary Tree
- Duplicate Subtrees
- Removing an edge divides in two halves ?
- Level order traversal in spiral form
- Reverse Level Order Traversal
- Tree from Inorder and Level order
- Clone a Binary Tree with Random Pointers
- All possible binary trees with given Inorder
- Populate Inorder Successors
- Complete Binary Tree from Linked List
- Min swaps to convert to BST
- Binary Tree to Doubly Linked List
- Convert a tree to forest of even nodes
- Flip Binary Tree
- Root to leaf paths without using recursion
- Check if Preorder, Inorder and Postorder are of same tree
- Check for Subtree
- Maximum subtree sum
- Maximum sum with no two adjacent
- Lowest Common Ancestor
- Height of a generic tree from parent array
- Distance between two given keys
- Diagonal Traversal of Binary Tree
- Boundary Traversal of binary tree
Hard Problems
- Min Time to Burn from Leaf
- Modify a binary tree to get Preorder traversal using right pointers
- Full Binary Tree using its Preorder and Mirror's Preorder
- A special tree from given preorder
- Tree from ancestor matrix
- Full k-ary tree from its preorder
- Binary Tree from String with bracket representation
- Binary Tree into Doubly Linked List in spiral fashion
- Binary Tree to a Circular Doubly Link List
- Ternary Expression to a Binary Tree
- Check if there is a root to leaf path with given sequence
- Remove all nodes which don’t lie in any path with sum>= k
- Maximum spiral sum in Binary Tree
- Sum of nodes at k-th level in a tree represented as string
- Sum of all the numbers that are formed from root to leaf paths
- Merge Two Binary Trees by doing Node Sum (Recursive and Iterative)
- Root of the tree from children ID sums
Quick Links :
Recommended: