Tree Interview Questions
156 real interview questions test Tree. Practice any of them in the code editor and get AI feedback on your solution.
- Junior21% (33)
- Mid/Senior54% (85)
- Staff24% (38)
Companies that ask Tree the most
Questionspage 1 of 2
- Binary Tree Maximum Path Sum23 companiesStaff
- Lowest Common Ancestor of a Binary Tree22 companiesMid/Senior
- Validate Binary Search Tree20 companiesMid/Senior
- Binary Tree Zigzag Level Order Traversal19 companiesMid/Senior
- Diameter of Binary Tree19 companiesJunior
- Maximum Depth of Binary Tree16 companiesJunior
- Binary Tree Right Side View15 companiesMid/Senior
- House Robber III15 companiesMid/Senior
- Binary Tree Level Order Traversal14 companiesMid/Senior
- Binary Tree Cameras14 companiesStaff
- Vertical Order Traversal of a Binary Tree14 companiesStaff
- All Nodes Distance K in Binary Tree13 companiesMid/Senior
- Amount of Time for Binary Tree to Be Infected12 companiesMid/Senior
- Collect Coins in a Tree12 companiesStaff
- Unique Binary Search Trees11 companiesMid/Senior
- Symmetric Tree11 companiesJunior
- Kth Smallest Element in a BST11 companiesMid/Senior
- Delete Node in a BST11 companiesMid/Senior
- Path Sum10 companiesJunior
- Path Sum II10 companiesMid/Senior
- Invert Binary Tree10 companiesJunior
- Lowest Common Ancestor of a Binary Search Tree10 companiesMid/Senior
- Path Sum III10 companiesMid/Senior
- Same Tree9 companiesJunior
- Construct Binary Tree from Preorder and Inorder Traversal9 companiesMid/Senior
- Convert Sorted Array to Binary Search Tree9 companiesJunior
- Convert Sorted List to Binary Search Tree9 companiesMid/Senior
- Flatten Binary Tree to Linked List8 companiesMid/Senior
- Find Largest Value in Each Tree Row8 companiesMid/Senior
- Subtree of Another Tree8 companiesJunior
- Merge Two Binary Trees8 companiesJunior
- Two Sum IV - Input is a BST8 companiesJunior
- Maximum Width of Binary Tree8 companiesMid/Senior
- Distribute Coins in Binary Tree8 companiesMid/Senior
- Recover Binary Search Tree7 companiesMid/Senior
- Construct Binary Tree from Inorder and Postorder Traversal7 companiesMid/Senior
- Balanced Binary Tree7 companiesJunior
- Sum Root to Leaf Numbers7 companiesMid/Senior
- Count Complete Tree Nodes7 companiesJunior
- Binary Tree Paths7 companiesJunior
- Sum of Left Leaves7 companiesJunior
- Find Bottom Left Tree Value7 companiesMid/Senior
- Longest Univalue Path7 companiesMid/Senior
- Insert into a Binary Search Tree7 companiesMid/Senior
- Cousins in Binary Tree7 companiesJunior
- Count Good Nodes in Binary Tree7 companiesMid/Senior
- Step-By-Step Directions From a Binary Tree Node to Another7 companiesMid/Senior
- Binary Tree Inorder Traversal6 companiesJunior
- Binary Tree Level Order Traversal II6 companiesMid/Senior
- Minimum Depth of Binary Tree6 companiesJunior
- Binary Tree Preorder Traversal6 companiesJunior
- Leaf-Similar Trees6 companiesJunior
- Construct Binary Tree from Preorder and Postorder Traversal6 companiesMid/Senior
- Range Sum of BST6 companiesJunior
- Sum of Root To Leaf Binary Numbers6 companiesJunior
- Minimum Time to Collect All Apples in a Tree6 companiesMid/Senior
- Most Profitable Path in a Tree6 companiesMid/Senior
- Binary Tree Postorder Traversal5 companiesJunior
- Print Binary Tree5 companiesMid/Senior
- Trim a Binary Search Tree5 companiesMid/Senior
- Search in a Binary Search Tree5 companiesJunior
- Sum of Distances in Tree5 companiesStaff
- Check Completeness of a Binary Tree5 companiesMid/Senior
- Construct Binary Search Tree from Preorder Traversal5 companiesMid/Senior
- Maximum Difference Between Node and Ancestor5 companiesMid/Senior
- Recover a Tree From Preorder Traversal5 companiesStaff
- Maximum Product of Splitted Binary Tree5 companiesMid/Senior
- Linked List in Binary Tree5 companiesMid/Senior
- Maximum Sum BST in Binary Tree5 companiesStaff
- Time Needed to Inform All Employees5 companiesMid/Senior
- Balance a Binary Search Tree5 companiesMid/Senior
- Create Binary Tree From Descriptions5 companiesMid/Senior
- Root Equals Sum of Children5 companiesJunior
- Longest Path With Different Adjacent Characters5 companiesStaff
- Count Nodes Equal to Average of Subtree5 companiesMid/Senior
- Minimum Fuel Cost to Report to the Capital5 companiesMid/Senior
- Find Mode in Binary Search Tree4 companiesJunior
- Convert BST to Greater Tree4 companiesMid/Senior
- Average of Levels in Binary Tree4 companiesJunior
- Minimum Distance Between BST Nodes4 companiesJunior
- Binary Tree Pruning4 companiesMid/Senior
- Smallest Subtree with all the Deepest Nodes4 companiesMid/Senior
- Flip Equivalent Binary Trees4 companiesMid/Senior
- Binary Search Tree to Greater Sum Tree4 companiesMid/Senior
- Lowest Common Ancestor of Deepest Leaves4 companiesMid/Senior
- Maximum Level Sum of a Binary Tree4 companiesMid/Senior
- Deepest Leaves Sum4 companiesMid/Senior
- Sum of Nodes with Even-Valued Grandparent4 companiesMid/Senior
- Delete Leaves With a Given Value4 companiesMid/Senior
- Minimum Score After Removals on a Tree4 companiesStaff
- Reverse Odd Levels of Binary Tree4 companiesMid/Senior
- Kth Largest Sum in a Binary Tree4 companiesMid/Senior
- Count Paths That Can Form a Palindrome in a Tree4 companiesStaff
- Maximum Number of K-Divisible Components4 companiesStaff
- Find the Maximum Sum of Node Values4 companiesStaff
- Most Frequent Subtree Sum3 companiesMid/Senior
- Minimum Absolute Difference in BST3 companiesJunior
- Binary Tree Tilt3 companiesJunior
- Construct String from Binary Tree3 companiesMid/Senior
- Add One Row to Tree3 companiesMid/Senior