Exercises/#133 Combination Sum
#133

Combination Sum

MediumπŸ“¦ Arrays
90 XP

Problem

Given an array of distinct integers and a target, find all unique combinations that sum to target. Numbers can be reused.

Examples

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]]
arraybacktrackingrecursion
AI Assistantβ€” powered by AI

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

133 / 150

Your Solution

⚑ JavaScript

to save progress and use AI features