← All problems

Combination Sum

Medium dynamic programmingbacktracking LeetCode ↗
All unique combinations summing to target; candidates reusable.

Hints (0/3 revealed)

Log in to reveal hints progressively.

Complexity

Time O(2^n) worst, Space O(target)

Common pitfalls

  • Permutations instead of combinations (no start index)
  • Missing the sort-prune

Your solution

Log in to save your code and track progress.