# Binary Search Tree DSA Problems

> 40 Binary Search Tree coding problems for placements and interviews, sorted easiest first, with hints and company tags. Free practice on InternHack.

Canonical: https://www.internhack.in/learn/dsa/binary-search-tree
Last updated: 2026-11-28

40 binary search tree problems for coding interviews and campus placements, with hints and company tags. Below are all 40: 10 easy, 26 medium and 4 hard. Practise them free on InternHack and track what you have solved.

## Binary Search Tree problems, easiest first

1. [Closest Binary Search Tree Value](https://www.internhack.in/learn/dsa/problem/closest-binary-search-tree-value) (Easy)
2. [Convert Sorted Array to Binary Search Tree](https://www.internhack.in/learn/dsa/problem/convert-sorted-array-to-binary-search-tree) (Easy)
3. [Find Mode in Binary Search Tree](https://www.internhack.in/learn/dsa/problem/find-mode-in-binary-search-tree) (Easy)
4. [Increasing Order Search Tree](https://www.internhack.in/learn/dsa/problem/increasing-order-search-tree) (Easy)
5. [Kth Largest Element in a Stream](https://www.internhack.in/learn/dsa/problem/kth-largest-element-in-a-stream) (Easy)
6. [Minimum Absolute Difference in BST](https://www.internhack.in/learn/dsa/problem/minimum-absolute-difference-in-bst) (Easy)
7. [Minimum Distance Between BST Nodes](https://www.internhack.in/learn/dsa/problem/minimum-distance-between-bst-nodes) (Easy)
8. [Range Sum of BST](https://www.internhack.in/learn/dsa/problem/range-sum-of-bst) (Easy)
9. [Search in a Binary Search Tree](https://www.internhack.in/learn/dsa/problem/search-in-a-binary-search-tree) (Easy)
10. [Two Sum IV - Input is a BST](https://www.internhack.in/learn/dsa/problem/two-sum-iv-input-is-a-bst) (Easy)
11. [All Elements in Two Binary Search Trees](https://www.internhack.in/learn/dsa/problem/all-elements-in-two-binary-search-trees) (Medium)
12. [Balance a Binary Search Tree](https://www.internhack.in/learn/dsa/problem/balance-a-binary-search-tree) (Medium)
13. [Binary Search Tree Iterator](https://www.internhack.in/learn/dsa/problem/binary-search-tree-iterator) (Medium)
14. [Binary Search Tree Iterator II](https://www.internhack.in/learn/dsa/problem/binary-search-tree-iterator-ii) (Medium)
15. [Binary Search Tree to Greater Sum Tree](https://www.internhack.in/learn/dsa/problem/binary-search-tree-to-greater-sum-tree) (Medium)
16. [Closest Nodes Queries in a Binary Search Tree](https://www.internhack.in/learn/dsa/problem/closest-nodes-queries-in-a-binary-search-tree) (Medium)
17. [Construct Binary Search Tree from Preorder Traversal](https://www.internhack.in/learn/dsa/problem/construct-binary-search-tree-from-preorder-traversal) (Medium)
18. [Convert Binary Search Tree to Sorted Doubly Linked List](https://www.internhack.in/learn/dsa/problem/convert-binary-search-tree-to-sorted-doubly-linked-list) (Medium)
19. [Convert BST to Greater Tree](https://www.internhack.in/learn/dsa/problem/convert-bst-to-greater-tree) (Medium)
20. [Convert Sorted List to Binary Search Tree](https://www.internhack.in/learn/dsa/problem/convert-sorted-list-to-binary-search-tree) (Medium)
21. [Delete Node in a BST](https://www.internhack.in/learn/dsa/problem/delete-node-in-a-bst) (Medium)
22. [Inorder Successor in BST](https://www.internhack.in/learn/dsa/problem/inorder-successor-in-bst) (Medium)
23. [Inorder Successor in BST II](https://www.internhack.in/learn/dsa/problem/inorder-successor-in-bst-ii) (Medium)
24. [Insert into a Binary Search Tree](https://www.internhack.in/learn/dsa/problem/insert-into-a-binary-search-tree) (Medium)
25. [Kth Smallest Element in a BST](https://www.internhack.in/learn/dsa/problem/kth-smallest-element-in-a-bst) (Medium)
26. [Largest BST Subtree](https://www.internhack.in/learn/dsa/problem/largest-bst-subtree) (Medium)
27. [Lowest Common Ancestor of a Binary Search Tree](https://www.internhack.in/learn/dsa/problem/lowest-common-ancestor-of-a-binary-search-tree) (Medium)
28. [Recover Binary Search Tree](https://www.internhack.in/learn/dsa/problem/recover-binary-search-tree) (Medium)
29. [Serialize and Deserialize BST](https://www.internhack.in/learn/dsa/problem/serialize-and-deserialize-bst) (Medium)
30. [Split BST](https://www.internhack.in/learn/dsa/problem/split-bst) (Medium)
31. [Trim a Binary Search Tree](https://www.internhack.in/learn/dsa/problem/trim-a-binary-search-tree) (Medium)
32. [Two Sum BSTs](https://www.internhack.in/learn/dsa/problem/two-sum-bsts) (Medium)
33. [Unique Binary Search Trees](https://www.internhack.in/learn/dsa/problem/unique-binary-search-trees) (Medium)
34. [Unique Binary Search Trees II](https://www.internhack.in/learn/dsa/problem/unique-binary-search-trees-ii) (Medium)
35. [Validate Binary Search Tree](https://www.internhack.in/learn/dsa/problem/validate-binary-search-tree) (Medium)
36. [Verify Preorder Sequence in Binary Search Tree](https://www.internhack.in/learn/dsa/problem/verify-preorder-sequence-in-binary-search-tree) (Medium)
37. [Closest Binary Search Tree Value II](https://www.internhack.in/learn/dsa/problem/closest-binary-search-tree-value-ii) (Hard)
38. [Maximum Sum BST in Binary Tree](https://www.internhack.in/learn/dsa/problem/maximum-sum-bst-in-binary-tree) (Hard)
39. [Merge BSTs to Create Single BST](https://www.internhack.in/learn/dsa/problem/merge-bsts-to-create-single-bst) (Hard)
40. [Number of Ways to Reorder Array to Get Same BST](https://www.internhack.in/learn/dsa/problem/number-of-ways-to-reorder-array-to-get-same-bst) (Hard)

## Companies that ask binary search tree problems

- [Amazon](https://www.internhack.in/learn/dsa/companies/amazon): 33 of these problems
- [Google](https://www.internhack.in/learn/dsa/companies/google): 33 of these problems
- [Meta](https://www.internhack.in/learn/dsa/companies/meta): 29 of these problems
- [Microsoft](https://www.internhack.in/learn/dsa/companies/microsoft): 27 of these problems
- [Bloomberg](https://www.internhack.in/learn/dsa/companies/bloomberg): 22 of these problems
- [Oracle](https://www.internhack.in/learn/dsa/companies/oracle): 8 of these problems
- [Tiktok](https://www.internhack.in/learn/dsa/companies/tiktok): 7 of these problems
- [Apple](https://www.internhack.in/learn/dsa/companies/apple): 6 of these problems
- [Linkedin](https://www.internhack.in/learn/dsa/companies/linkedin): 6 of these problems
- [Uber](https://www.internhack.in/learn/dsa/companies/uber): 5 of these problems
- [Adobe](https://www.internhack.in/learn/dsa/companies/adobe): 5 of these problems
- [Goldman Sachs](https://www.internhack.in/learn/dsa/companies/goldman-sachs): 3 of these problems

## Before your interview

Most resumes are filtered by software before a recruiter reads them. [Check your resume ATS score free](https://www.internhack.in/ats-score/try), no signup needed.

## Other DSA topics

- [Array](https://www.internhack.in/learn/dsa/array) (1869)
- [String](https://www.internhack.in/learn/dsa/string) (775)
- [Hash Table](https://www.internhack.in/learn/dsa/hash-table) (708)
- [Math](https://www.internhack.in/learn/dsa/math) (564)
- [Dynamic Programming](https://www.internhack.in/learn/dsa/dynamic-programming) (557)
- [Sorting](https://www.internhack.in/learn/dsa/sorting) (464)
- [Greedy](https://www.internhack.in/learn/dsa/greedy) (407)
- [Depth-First Search](https://www.internhack.in/learn/dsa/depth-first-search) (314)
- [Binary Search](https://www.internhack.in/learn/dsa/binary-search) (298)
- [Matrix](https://www.internhack.in/learn/dsa/matrix) (246)
- [Breadth-First Search](https://www.internhack.in/learn/dsa/breadth-first-search) (245)
- [Bit Manipulation](https://www.internhack.in/learn/dsa/bit-manipulation) (238)
- [Tree](https://www.internhack.in/learn/dsa/tree) (235)
- [Two Pointers](https://www.internhack.in/learn/dsa/two-pointers) (217)
- [Prefix Sum](https://www.internhack.in/learn/dsa/prefix-sum) (204)
- [Database](https://www.internhack.in/learn/dsa/database) (197)
- [Heap (Priority Queue)](https://www.internhack.in/learn/dsa/heap-priority-queue) (196)
- [Simulation](https://www.internhack.in/learn/dsa/simulation) (177)
- [Counting](https://www.internhack.in/learn/dsa/counting) (174)
- [Binary Tree](https://www.internhack.in/learn/dsa/binary-tree) (169)

## Related

- [Home](https://www.internhack.in/)
- [Learn](https://www.internhack.in/learn)
- [DSA](https://www.internhack.in/learn/dsa)
