Given an array of distinct integers and a target, find all unique combinations that sum to target. Numbers can be reused.
Input: candidates=[2,3,6,7], target=7 Output: [[2,2,3],[7]] Input: candidates=[2,3,5], target=8 Output: [[2,2,2,2],[2,3,3],[3,5]]
Unlock hints progressively β start gentle, go deeper only if needed.
Level 1: Gentle Nudge
A subtle direction
Level 2: Approach
The algorithm to use
Level 3: Detailed
Step-by-step guidance
to save progress and use AI features