Open In App
Related Articles

Top 50 Tree Coding Problems for Interviews

Like Article
Save Article
Report issue

Here is the collection of the Top 50 list of frequently asked interviews question on Tree. Problems in this Article are divided into three Levels so that readers can practice according to the difficulty level step by step.


Level 1



Height of Binary TreeSolve
Determine if two trees are identicalSolve
Mirror treeSolve
Symmetric TreeSolve
Diameter of treeSolve
Checked for Balanced treeSolve
Children Sum ParentSolve
Check for BSTSolve
Array to BSTSolve
Largest value in each level of binary treeSolve
Maximum GCD of siblings of a binary treeSolve
Zigzag Tree TraversalSolve
Inorder Successor in BSTSolve
Kth Largest Element in a BSTSolve

Level 2



Check if subtreeSolve
Single Valued SubtreeSolve
Unique BSTsSolve
Inorder Traversal (iterative)Solve
Preorder Traversal (iterative)Solve
Postorder Traversal(iterative)Solve
Vertical Traversal of a Binary TreeSolve
Boundary TraversalSolve
Construct Binary Tree from Parent arraySolve
Construct Binary Tree from Preorder and Inorder TraversalSolve
Preorder Traversal and BSTSolve
Construct tree from preorder traversalSolve
Minimum distance between two given nodesSolve
Maximum sum leaf to root pathSolve
Odd Even Level DifferenceSolve
Lowest Common Ancestor of a Binary TreeSolve
Ancestors in Binary TreeSolve
Remove BST keys outside the given rangeSolve
Pair with given target in BSTSolve
Sum TreeSolve
BST to greater sum treeSolve
BST to max heapSolve
Clone binary tree with random pointerSolve
Maximum sum of non adjacent nodesSolve
Largest BST in a Binary TreeSolve
Extreme nodes in alternate orderSolve

Level 3



Connect nodes at same levelSolve
Nodes at given distance in a Binary TreeSolve
Sorted Linked List to BSTSolve
Binary Tree to Doubly Linked ListSolve
Maximum sum path between two leaf nodesSolve
K-Sum PathsSolve
Number of turns in a binary treeSolve
Merge two BST’sSolve
Fixing two nodes of a BSTSolve
Burn Binary TreeSolve

Related Articles:

Some other important Tutorials:

Last Updated : 28 Nov, 2023
Like Article
Save Article
Share your thoughts in the comments
Similar Reads