# Backtracking DSA Problems

> 109 Backtracking 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/backtracking
Last updated: 2026-11-28

109 backtracking problems for coding interviews and campus placements, with hints and company tags. Below are the first 100 of 109: 3 easy, 65 medium and 32 hard. Practise them free on InternHack and track what you have solved.

## Backtracking problems, easiest first

1. [Binary Tree Paths](https://www.internhack.in/learn/dsa/problem/binary-tree-paths) (Easy)
2. [Binary Watch](https://www.internhack.in/learn/dsa/problem/binary-watch) (Easy)
3. [Sum of All Subset XOR Totals](https://www.internhack.in/learn/dsa/problem/sum-of-all-subset-xor-totals) (Easy)
4. [Additive Number](https://www.internhack.in/learn/dsa/problem/additive-number) (Medium)
5. [All Paths From Source to Target](https://www.internhack.in/learn/dsa/problem/all-paths-from-source-to-target) (Medium)
6. [Ambiguous Coordinates](https://www.internhack.in/learn/dsa/problem/ambiguous-coordinates) (Medium)
7. [Android Unlock Patterns](https://www.internhack.in/learn/dsa/problem/android-unlock-patterns) (Medium)
8. [Balanced K-Factor Decomposition](https://www.internhack.in/learn/dsa/problem/balanced-k-factor-decomposition) (Medium)
9. [Beautiful Arrangement](https://www.internhack.in/learn/dsa/problem/beautiful-arrangement) (Medium)
10. [Brace Expansion](https://www.internhack.in/learn/dsa/problem/brace-expansion) (Medium)
11. [Campus Bikes II](https://www.internhack.in/learn/dsa/problem/campus-bikes-ii) (Medium)
12. [Circular Permutation in Binary Representation](https://www.internhack.in/learn/dsa/problem/circular-permutation-in-binary-representation) (Medium)
13. [Closest Dessert Cost](https://www.internhack.in/learn/dsa/problem/closest-dessert-cost) (Medium)
14. [Combination Sum](https://www.internhack.in/learn/dsa/problem/combination-sum) (Medium)
15. [Combination Sum II](https://www.internhack.in/learn/dsa/problem/combination-sum-ii) (Medium)
16. [Combination Sum III](https://www.internhack.in/learn/dsa/problem/combination-sum-iii) (Medium)
17. [Combinations](https://www.internhack.in/learn/dsa/problem/combinations) (Medium)
18. [Construct Smallest Number From DI String](https://www.internhack.in/learn/dsa/problem/construct-smallest-number-from-di-string) (Medium)
19. [Construct the Lexicographically Largest Valid Sequence](https://www.internhack.in/learn/dsa/problem/construct-the-lexicographically-largest-valid-sequence) (Medium)
20. [Count Number of Maximum Bitwise-OR Subsets](https://www.internhack.in/learn/dsa/problem/count-number-of-maximum-bitwise-or-subsets) (Medium)
21. [Count Numbers with Unique Digits](https://www.internhack.in/learn/dsa/problem/count-numbers-with-unique-digits) (Medium)
22. [Factor Combinations](https://www.internhack.in/learn/dsa/problem/factor-combinations) (Medium)
23. [Fair Distribution of Cookies](https://www.internhack.in/learn/dsa/problem/fair-distribution-of-cookies) (Medium)
24. [Find the Punishment Number of an Integer](https://www.internhack.in/learn/dsa/problem/find-the-punishment-number-of-an-integer) (Medium)
25. [Find Unique Binary String](https://www.internhack.in/learn/dsa/problem/find-unique-binary-string) (Medium)
26. [Flip Game II](https://www.internhack.in/learn/dsa/problem/flip-game-ii) (Medium)
27. [Generalized Abbreviation](https://www.internhack.in/learn/dsa/problem/generalized-abbreviation) (Medium)
28. [Generate Binary Strings Without Adjacent Zeros](https://www.internhack.in/learn/dsa/problem/generate-binary-strings-without-adjacent-zeros) (Medium)
29. [Generate Parentheses](https://www.internhack.in/learn/dsa/problem/generate-parentheses) (Medium)
30. [Gray Code](https://www.internhack.in/learn/dsa/problem/gray-code) (Medium)
31. [Iterator for Combination](https://www.internhack.in/learn/dsa/problem/iterator-for-combination) (Medium)
32. [Largest Time for Given Digits](https://www.internhack.in/learn/dsa/problem/largest-time-for-given-digits) (Medium)
33. [Letter Case Permutation](https://www.internhack.in/learn/dsa/problem/letter-case-permutation) (Medium)
34. [Letter Combinations of a Phone Number](https://www.internhack.in/learn/dsa/problem/letter-combinations-of-a-phone-number) (Medium)
35. [Letter Tile Possibilities](https://www.internhack.in/learn/dsa/problem/letter-tile-possibilities) (Medium)
36. [Matchsticks to Square](https://www.internhack.in/learn/dsa/problem/matchsticks-to-square) (Medium)
37. [Maximum Compatibility Score Sum](https://www.internhack.in/learn/dsa/problem/maximum-compatibility-score-sum) (Medium)
38. [Maximum Length of a Concatenated String with Unique Characters](https://www.internhack.in/learn/dsa/problem/maximum-length-of-a-concatenated-string-with-unique-characters) (Medium)
39. [Maximum Points in an Archery Competition](https://www.internhack.in/learn/dsa/problem/maximum-points-in-an-archery-competition) (Medium)
40. [Maximum Product of the Length of Two Palindromic Subsequences](https://www.internhack.in/learn/dsa/problem/maximum-product-of-the-length-of-two-palindromic-subsequences) (Medium)
41. [Maximum Rows Covered by Columns](https://www.internhack.in/learn/dsa/problem/maximum-rows-covered-by-columns) (Medium)
42. [Maximum Split of Positive Even Integers](https://www.internhack.in/learn/dsa/problem/maximum-split-of-positive-even-integers) (Medium)
43. [Minimum Moves to Spread Stones Over Grid](https://www.internhack.in/learn/dsa/problem/minimum-moves-to-spread-stones-over-grid) (Medium)
44. [Minimum Number of Lines to Cover Points](https://www.internhack.in/learn/dsa/problem/minimum-number-of-lines-to-cover-points) (Medium)
45. [Minimum Number of Work Sessions to Finish the Tasks](https://www.internhack.in/learn/dsa/problem/minimum-number-of-work-sessions-to-finish-the-tasks) (Medium)
46. [Minimum Time to Break Locks I](https://www.internhack.in/learn/dsa/problem/minimum-time-to-break-locks-i) (Medium)
47. [Next Closest Time](https://www.internhack.in/learn/dsa/problem/next-closest-time) (Medium)
48. [Next Greater Numerically Balanced Number](https://www.internhack.in/learn/dsa/problem/next-greater-numerically-balanced-number) (Medium)
49. [Non-decreasing Subsequences](https://www.internhack.in/learn/dsa/problem/non-decreasing-subsequences) (Medium)
50. [Number of Self-Divisible Permutations](https://www.internhack.in/learn/dsa/problem/number-of-self-divisible-permutations) (Medium)
51. [Numbers With Same Consecutive Differences](https://www.internhack.in/learn/dsa/problem/numbers-with-same-consecutive-differences) (Medium)
52. [Palindrome Partitioning](https://www.internhack.in/learn/dsa/problem/palindrome-partitioning) (Medium)
53. [Palindrome Permutation II](https://www.internhack.in/learn/dsa/problem/palindrome-permutation-ii) (Medium)
54. [Partition to K Equal Sum Subsets](https://www.internhack.in/learn/dsa/problem/partition-to-k-equal-sum-subsets) (Medium)
55. [Path Sum II](https://www.internhack.in/learn/dsa/problem/path-sum-ii) (Medium)
56. [Path with Maximum Gold](https://www.internhack.in/learn/dsa/problem/path-with-maximum-gold) (Medium)
57. [Permutations](https://www.internhack.in/learn/dsa/problem/permutations) (Medium)
58. [Permutations II](https://www.internhack.in/learn/dsa/problem/permutations-ii) (Medium)
59. [Permutations III](https://www.internhack.in/learn/dsa/problem/permutations-iii) (Medium)
60. [Pyramid Transition Matrix](https://www.internhack.in/learn/dsa/problem/pyramid-transition-matrix) (Medium)
61. [Restore IP Addresses](https://www.internhack.in/learn/dsa/problem/restore-ip-addresses) (Medium)
62. [Shopping Offers](https://www.internhack.in/learn/dsa/problem/shopping-offers) (Medium)
63. [Smallest String Starting From Leaf](https://www.internhack.in/learn/dsa/problem/smallest-string-starting-from-leaf) (Medium)
64. [Split a String Into the Max Number of Unique Substrings](https://www.internhack.in/learn/dsa/problem/split-a-string-into-the-max-number-of-unique-substrings) (Medium)
65. [Split Array into Fibonacci Sequence](https://www.internhack.in/learn/dsa/problem/split-array-into-fibonacci-sequence) (Medium)
66. [Stepping Numbers](https://www.internhack.in/learn/dsa/problem/stepping-numbers) (Medium)
67. [Subsets](https://www.internhack.in/learn/dsa/problem/subsets) (Medium)
68. [Subsets II](https://www.internhack.in/learn/dsa/problem/subsets-ii) (Medium)
69. [24 Game](https://www.internhack.in/learn/dsa/problem/24-game) (Hard)
70. [Brace Expansion II](https://www.internhack.in/learn/dsa/problem/brace-expansion-ii) (Hard)
71. [Confusing Number II](https://www.internhack.in/learn/dsa/problem/confusing-number-ii) (Hard)
72. [Distribute Repeating Integers](https://www.internhack.in/learn/dsa/problem/distribute-repeating-integers) (Hard)
73. [Expression Add Operators](https://www.internhack.in/learn/dsa/problem/expression-add-operators) (Hard)
74. [Find Minimum Time to Finish All Jobs](https://www.internhack.in/learn/dsa/problem/find-minimum-time-to-finish-all-jobs) (Hard)
75. [Longest Subsequence Repeated k Times](https://www.internhack.in/learn/dsa/problem/longest-subsequence-repeated-k-times) (Hard)
76. [Maximize Score After N Operations](https://www.internhack.in/learn/dsa/problem/maximize-score-after-n-operations) (Hard)
77. [Maximum Good People Based on Statements](https://www.internhack.in/learn/dsa/problem/maximum-good-people-based-on-statements) (Hard)
78. [Maximum Number of Achievable Transfer Requests](https://www.internhack.in/learn/dsa/problem/maximum-number-of-achievable-transfer-requests) (Hard)
79. [Maximum Path Quality of a Graph](https://www.internhack.in/learn/dsa/problem/maximum-path-quality-of-a-graph) (Hard)
80. [Maximum Score Words Formed by Letters](https://www.internhack.in/learn/dsa/problem/maximum-score-words-formed-by-letters) (Hard)
81. [Minimum Unique Word Abbreviation](https://www.internhack.in/learn/dsa/problem/minimum-unique-word-abbreviation) (Hard)
82. [N-Queens](https://www.internhack.in/learn/dsa/problem/n-queens) (Hard)
83. [N-Queens II](https://www.internhack.in/learn/dsa/problem/n-queens-ii) (Hard)
84. [Next Special Palindrome Number](https://www.internhack.in/learn/dsa/problem/next-special-palindrome-number) (Hard)
85. [Number of Squareful Arrays](https://www.internhack.in/learn/dsa/problem/number-of-squareful-arrays) (Hard)
86. [Number of Valid Move Combinations On Chessboard](https://www.internhack.in/learn/dsa/problem/number-of-valid-move-combinations-on-chessboard) (Hard)
87. [Optimal Account Balancing](https://www.internhack.in/learn/dsa/problem/optimal-account-balancing) (Hard)
88. [Remove Invalid Parentheses](https://www.internhack.in/learn/dsa/problem/remove-invalid-parentheses) (Hard)
89. [Robot Room Cleaner](https://www.internhack.in/learn/dsa/problem/robot-room-cleaner) (Hard)
90. [Sliding Puzzle](https://www.internhack.in/learn/dsa/problem/sliding-puzzle) (Hard)
91. [Smallest Divisible Digit Product II](https://www.internhack.in/learn/dsa/problem/smallest-divisible-digit-product-ii) (Hard)
92. [Stickers to Spell Word](https://www.internhack.in/learn/dsa/problem/stickers-to-spell-word) (Hard)
93. [Sudoku Solver](https://www.internhack.in/learn/dsa/problem/sudoku-solver) (Hard)
94. [Tiling a Rectangle with the Fewest Squares](https://www.internhack.in/learn/dsa/problem/tiling-a-rectangle-with-the-fewest-squares) (Hard)
95. [Unique Paths III](https://www.internhack.in/learn/dsa/problem/unique-paths-iii) (Hard)
96. [Verbal Arithmetic Puzzle](https://www.internhack.in/learn/dsa/problem/verbal-arithmetic-puzzle) (Hard)
97. [Word Break II](https://www.internhack.in/learn/dsa/problem/word-break-ii) (Hard)
98. [Word Ladder II](https://www.internhack.in/learn/dsa/problem/word-ladder-ii) (Hard)
99. [Word Search II](https://www.internhack.in/learn/dsa/problem/word-search-ii) (Hard)
100. [Word Squares](https://www.internhack.in/learn/dsa/problem/word-squares) (Hard)

## Companies that ask backtracking problems

- [Google](https://www.internhack.in/learn/dsa/companies/google): 83 of these problems
- [Amazon](https://www.internhack.in/learn/dsa/companies/amazon): 59 of these problems
- [Meta](https://www.internhack.in/learn/dsa/companies/meta): 48 of these problems
- [Microsoft](https://www.internhack.in/learn/dsa/companies/microsoft): 47 of these problems
- [Bloomberg](https://www.internhack.in/learn/dsa/companies/bloomberg): 40 of these problems
- [Tiktok](https://www.internhack.in/learn/dsa/companies/tiktok): 22 of these problems
- [Apple](https://www.internhack.in/learn/dsa/companies/apple): 18 of these problems
- [Uber](https://www.internhack.in/learn/dsa/companies/uber): 15 of these problems
- [Oracle](https://www.internhack.in/learn/dsa/companies/oracle): 15 of these problems
- [Goldman Sachs](https://www.internhack.in/learn/dsa/companies/goldman-sachs): 14 of these problems
- [Zoho](https://www.internhack.in/learn/dsa/companies/zoho): 12 of these problems
- [Adobe](https://www.internhack.in/learn/dsa/companies/adobe): 11 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)
