Dsa
Backtracking
Medium
Combination Sum Finder
Given an array of distinct integers and a target sum, find all unique combinations of the integers that can be summed to the target. Each number in the array may be used an unlimited number of times. The output consists of lists of combinations. Input format: The first line contains space-separated integers followed by an integer target on the last line. Output format: A list of lists representing all unique combinations. Example: Input:
2 3 6 7
7
Output:
[[7]]
Key concepts
backtrackingcombinatoricssum
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now