Top 50 Trees Interview Questions
The most frequently asked Trees questions across all roles and companies, ranked by real interview frequency. Updated daily.
Use postorder recursion to determine whether a binary tree is height-balanced in O(n) time.
Meta
Etsy
LendingTreeFind the lowest common ancestor of two nodes in a binary search tree using BST ordering.
Capital One
airtel
TAS Information IntelligenceProblem Given the root of a binary tree, return its maximum depth as an integer. The maximum depth is the number of nodes along the longest path from the ...
Reliable Software Resources
PTC
ChartmetricTraverse a graph or tree with DFS and return the visit order from a given start node.
Zensar Technologies
Avnet
Oak Ridge National LaboratorySerialize a binary tree to a string and reconstruct it exactly using preorder traversal with null markers.
Meta
BarclaysProblem At Dropbox, a service stores ordered values in a binary tree and needs to verify that the structure satisfies binary search tree rules. Given the r...
MilestoneFFox
GarminImplement a binary CART decision tree that selects numerical splits using Gini impurity.
GE Appliances
Airtel Payments Bank
Atlantic Coast MortgageTraverse a binary tree level by level using a queue-based breadth-first search.
Reply
Amplifi Group
Expedia GroupSign up to see every question
Create a free account to unlock this list and practice real interview questions.