Skip to content

Binary Tree Problems

Binary trees are trees where each node has at most two children. These problems cover traversals, construction from arrays, balancing checks, and level-order operations.

33 problems

Title Difficulty
All Nodes Distance K in Binary Tree Medium
Balanced Binary Tree Easy
Binary Search Tree Iterator Medium
Binary Tree Cameras Hard
Binary Tree Level Order Traversal Medium
Binary Tree Maximum Path Sum Hard
Binary Tree Paths Easy
Binary Tree Right Side View Medium
Binary Tree Zigzag Level Order Traversal Medium
BST with a Dead End Easy
Construct Binary Tree from Preorder and Postorder Traversal Medium
Construct BST from Preorder Traversal Hard
Convert Sorted Array to Binary Search Tree Easy
Count BST Nodes in a Range Medium
Diameter of Binary Tree Easy
Median of a Binary Search Tree Hard
Flatten Binary Tree to Linked List Medium
Binary Tree Inorder Traversal Easy
Binary Tree to Doubly Linked List Hard
Invert Binary Tree Easy
Lowest Common Ancestor of a Binary Tree Medium
Maximum Depth of Binary Tree Easy
Maximum Width of Binary Tree Medium
Merge Two Binary Trees Easy
Distance Between Two Tree Nodes Medium
Path Sum Easy
Path Sum III Medium
Populating Next Right Pointers in Each Node Medium
Same Tree Easy
Serialize and Deserialize Binary Tree Hard
Subtree of Another Tree Easy
Sum of Left Leaves Easy
Symmetric Tree Easy