Skip to main content

Combination Sum

Learn Combination Sum (Recursion & Backtracking, Data Structures & Algorithms) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Combinations That Sum to a Target - REUSING Elements Allowed Given candidates and a target, find all combinations summing to target, where each candidate can be used UNLIMITED times. The key difference from plain Combinations: when recursing after choosing candidates[i], the next call starts from i again (not i+1 ), allowing the same element to be picked repeatedly.

More lessons in Recursion & Backtracking