Combination Sum
Medium
Recursion & Backtracking
Given distinct positive integers (candidates) and a target, print all unique combinations whose elements sum to target. A number may be used any number of times. Each combination is printed in non-decreasing order and combinations are listed in lexicographic order.
Constraints
1 <= n <= 30 2 <= candidates[i] <= 40 1 <= target <= 40
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.