# Divide and Conquer DSA Problems

> 52 Divide and Conquer 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/divide-and-conquer
Last updated: 2026-11-28

52 divide and conquer problems for coding interviews and campus placements, with hints and company tags. Below are all 52: 5 easy, 28 medium and 19 hard. Practise them free on InternHack and track what you have solved.

## Divide and Conquer problems, easiest first

1. [Convert Sorted Array to Binary Search Tree](https://www.internhack.in/learn/dsa/problem/convert-sorted-array-to-binary-search-tree) (Easy)
2. [Longest Nice Substring](https://www.internhack.in/learn/dsa/problem/longest-nice-substring) (Easy)
3. [Majority Element](https://www.internhack.in/learn/dsa/problem/majority-element) (Easy)
4. [Number of 1 Bits](https://www.internhack.in/learn/dsa/problem/number-of-1-bits) (Easy)
5. [Reverse Bits](https://www.internhack.in/learn/dsa/problem/reverse-bits) (Easy)
6. [Balance a Binary Search Tree](https://www.internhack.in/learn/dsa/problem/balance-a-binary-search-tree) (Medium)
7. [Beautiful Array](https://www.internhack.in/learn/dsa/problem/beautiful-array) (Medium)
8. [Construct Binary Tree from Inorder and Postorder Traversal](https://www.internhack.in/learn/dsa/problem/construct-binary-tree-from-inorder-and-postorder-traversal) (Medium)
9. [Construct Binary Tree from Preorder and Inorder Traversal](https://www.internhack.in/learn/dsa/problem/construct-binary-tree-from-preorder-and-inorder-traversal) (Medium)
10. [Construct Binary Tree from Preorder and Postorder Traversal](https://www.internhack.in/learn/dsa/problem/construct-binary-tree-from-preorder-and-postorder-traversal) (Medium)
11. [Construct Quad Tree](https://www.internhack.in/learn/dsa/problem/construct-quad-tree) (Medium)
12. [Convert Sorted List to Binary Search Tree](https://www.internhack.in/learn/dsa/problem/convert-sorted-list-to-binary-search-tree) (Medium)
13. [Count Subarrays With More Ones Than Zeros](https://www.internhack.in/learn/dsa/problem/count-subarrays-with-more-ones-than-zeros) (Medium)
14. [Design Most Recently Used Queue](https://www.internhack.in/learn/dsa/problem/design-most-recently-used-queue) (Medium)
15. [Fill a Special Grid](https://www.internhack.in/learn/dsa/problem/fill-a-special-grid) (Medium)
16. [Find Kth Largest XOR Coordinate Value](https://www.internhack.in/learn/dsa/problem/find-kth-largest-xor-coordinate-value) (Medium)
17. [Find the Kth Largest Integer in the Array](https://www.internhack.in/learn/dsa/problem/find-the-kth-largest-integer-in-the-array) (Medium)
18. [K Closest Points to Origin](https://www.internhack.in/learn/dsa/problem/k-closest-points-to-origin) (Medium)
19. [Kth Largest Element in an Array](https://www.internhack.in/learn/dsa/problem/kth-largest-element-in-an-array) (Medium)
20. [Longest Balanced Subarray I](https://www.internhack.in/learn/dsa/problem/longest-balanced-subarray-i) (Medium)
21. [Longest Substring with At Least K Repeating Characters](https://www.internhack.in/learn/dsa/problem/longest-substring-with-at-least-k-repeating-characters) (Medium)
22. [Maximum Binary Tree](https://www.internhack.in/learn/dsa/problem/maximum-binary-tree) (Medium)
23. [Maximum Subarray](https://www.internhack.in/learn/dsa/problem/maximum-subarray) (Medium)
24. [Maximum Sum Circular Subarray](https://www.internhack.in/learn/dsa/problem/maximum-sum-circular-subarray) (Medium)
25. [Query Kth Smallest Trimmed Number](https://www.internhack.in/learn/dsa/problem/query-kth-smallest-trimmed-number) (Medium)
26. [Range Sum Query - Mutable](https://www.internhack.in/learn/dsa/problem/range-sum-query-mutable) (Medium)
27. [Search a 2D Matrix II](https://www.internhack.in/learn/dsa/problem/search-a-2d-matrix-ii) (Medium)
28. [Sort an Array](https://www.internhack.in/learn/dsa/problem/sort-an-array) (Medium)
29. [Sort List](https://www.internhack.in/learn/dsa/problem/sort-list) (Medium)
30. [Super Pow](https://www.internhack.in/learn/dsa/problem/super-pow) (Medium)
31. [Top K Frequent Elements](https://www.internhack.in/learn/dsa/problem/top-k-frequent-elements) (Medium)
32. [Wiggle Sort II](https://www.internhack.in/learn/dsa/problem/wiggle-sort-ii) (Medium)
33. [XOR After Range Multiplication Queries I](https://www.internhack.in/learn/dsa/problem/xor-after-range-multiplication-queries-i) (Medium)
34. [Count Good Triplets in an Array](https://www.internhack.in/learn/dsa/problem/count-good-triplets-in-an-array) (Hard)
35. [Count of Range Sum](https://www.internhack.in/learn/dsa/problem/count-of-range-sum) (Hard)
36. [Count of Smaller Numbers After Self](https://www.internhack.in/learn/dsa/problem/count-of-smaller-numbers-after-self) (Hard)
37. [Count the Number of K-Big Indices](https://www.internhack.in/learn/dsa/problem/count-the-number-of-k-big-indices) (Hard)
38. [Create Sorted Array through Instructions](https://www.internhack.in/learn/dsa/problem/create-sorted-array-through-instructions) (Hard)
39. [Find Array Given Subset Sums](https://www.internhack.in/learn/dsa/problem/find-array-given-subset-sums) (Hard)
40. [Longest Balanced Subarray II](https://www.internhack.in/learn/dsa/problem/longest-balanced-subarray-ii) (Hard)
41. [Longest Increasing Subsequence II](https://www.internhack.in/learn/dsa/problem/longest-increasing-subsequence-ii) (Hard)
42. [Maximum Sum of Subsequence With Non-adjacent Elements](https://www.internhack.in/learn/dsa/problem/maximum-sum-of-subsequence-with-non-adjacent-elements) (Hard)
43. [Median of Two Sorted Arrays](https://www.internhack.in/learn/dsa/problem/median-of-two-sorted-arrays) (Hard)
44. [Merge k Sorted Lists](https://www.internhack.in/learn/dsa/problem/merge-k-sorted-lists) (Hard)
45. [Number of Pairs Satisfying Inequality](https://www.internhack.in/learn/dsa/problem/number-of-pairs-satisfying-inequality) (Hard)
46. [Number of Ships in a Rectangle](https://www.internhack.in/learn/dsa/problem/number-of-ships-in-a-rectangle) (Hard)
47. [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)
48. [Reverse Pairs](https://www.internhack.in/learn/dsa/problem/reverse-pairs) (Hard)
49. [Special Binary String](https://www.internhack.in/learn/dsa/problem/special-binary-string) (Hard)
50. [The Skyline Problem](https://www.internhack.in/learn/dsa/problem/the-skyline-problem) (Hard)
51. [Threshold Majority Queries](https://www.internhack.in/learn/dsa/problem/threshold-majority-queries) (Hard)
52. [XOR After Range Multiplication Queries II](https://www.internhack.in/learn/dsa/problem/xor-after-range-multiplication-queries-ii) (Hard)

## Companies that ask divide and conquer problems

- [Google](https://www.internhack.in/learn/dsa/companies/google): 45 of these problems
- [Amazon](https://www.internhack.in/learn/dsa/companies/amazon): 35 of these problems
- [Bloomberg](https://www.internhack.in/learn/dsa/companies/bloomberg): 31 of these problems
- [Meta](https://www.internhack.in/learn/dsa/companies/meta): 31 of these problems
- [Microsoft](https://www.internhack.in/learn/dsa/companies/microsoft): 30 of these problems
- [Apple](https://www.internhack.in/learn/dsa/companies/apple): 15 of these problems
- [Tiktok](https://www.internhack.in/learn/dsa/companies/tiktok): 11 of these problems
- [Adobe](https://www.internhack.in/learn/dsa/companies/adobe): 11 of these problems
- [Oracle](https://www.internhack.in/learn/dsa/companies/oracle): 11 of these problems
- [Goldman Sachs](https://www.internhack.in/learn/dsa/companies/goldman-sachs): 10 of these problems
- [Uber](https://www.internhack.in/learn/dsa/companies/uber): 10 of these problems
- [Nvidia](https://www.internhack.in/learn/dsa/companies/nvidia): 9 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)
